Skip to content
cccskills
FreePublished on GitHubEnglish overview

agent-signal

Build event-driven background workflows for agents by defining sources, interpreting them as signals, and running actions through policies. It also guides asynchronous handoffs, deduplication, scoped execution, completion receipts, and observability.

OriginalShow the original description

Use for Agent Signal sources, actions, policies, middleware, workflow handoff and deduplication.

lobehub/lobehub83,506 stars(GitHub 83,506 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Adding a new event source to an agent workflow
  • Routing interpreted signals to concrete background actions
  • Enqueuing work for asynchronous processing
  • Preventing duplicate execution of repeated events
  • Tracing and debugging agent workflows

Overview

What it does

This skill guides the design and implementation of event-driven background work for agents, separate from the foreground chat request. It helps define clear roles for a source (a fact that occurred), a signal (its meaning or routing), an action (the side effect), and a policy (the bundle connecting them). It also covers choosing between immediate execution and queueing work, preventing duplicate runs, managing execution scope, recording completion receipts, and adding traces or metrics.

When it helps

Use it when building an event-driven agent workflow or adding events, actions, or policies to an existing background process. It can also guide work that needs to record a user-visible result after asynchronous processing, or make execution easier to track and debug.

Example requests

  • “Add a background workflow for this event that follows the existing policies.”
  • “Prevent this action from running twice when the same event arrives more than once.”
  • “Add a completion notice and tracing for this asynchronous process.”

Notes

Implementation refers to references/architecture.md and references/handlers.md, and to references/observability.md when needed. The source material assumes the existing Agent Signal runtime, types, handlers, and test environment.

This overview was written by AI (OpenAI Codex) from the public SKILL.md. Check the original below for the exact behavior.

Document check

AI checked the SKILL.md for operations that need care and for setup requirements. The score comes only from actually running the skill (hands-on test).

SafetyAre sending data, deleting files, and running commands disclosed?
BPartly lackingIt covers queueing and side effects, but gives no pre-operation confirmation step.
Easy setupDoes it need few tools or API keys, and are they documented?
BPartly lackingIt assumes an existing runtime and test environment, without setup instructions.

Not counted in the score. Rated by AI (OpenAI Codex) as of Oct 26, 2026. Treat it as a guide and read the original before installing.

Disagree? Request a re-evaluation

Tell us which point is wrong and why. No login needed. We will check it against the SKILL.md, redo the evaluation, and show the result here.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Files included (5)

  • SKILL.md6.5 KB
  • agents/openai.yaml280 B
  • references/architecture.md8.0 KB
  • references/handlers.md6.7 KB
  • references/observability.md4.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Agent Signal

Use this skill to implement event-driven background work for agents without coupling the work to the foreground chat request.

Agent Signal has one consistent runtime shape:

source event -> signal interpretation -> action execution -> built-in result signals

Durable self-iteration work has one extra completion branch:

memory/skill action -> execAgent enqueue -> agent.execution.completed -> selfIteration receipt projection

Start Here

  1. Read references/architecture.md to map the package boundary, runtime queue, scope model, and async workflow handoff.
  2. Read references/handlers.md before writing any new policy, source handler, signal handler, or action handler.
  3. Read references/observability.md when you need tracing, metrics, debugging, or workflow snapshot visibility.

Use The Right Entry Point

  • Use emitAgentSignalSourceEvent(...) when a server-owned producer should execute the pipeline immediately.
  • Use executeAgentSignalSourceEvent(...) when a worker or controlled backend path already owns execution timing and may inject a runtime guard backend.
  • Use enqueueAgentSignalSourceEvent(...) when the caller should return quickly and let Upstash Workflow process the event out-of-band.
  • Use emitAgentSignalSourceEventWithStore(...) for isolated tests or evals that should avoid ambient Redis state.

Read:

  • apps/server/src/services/agentSignal/index.ts
  • apps/server/src/workflows/agentSignal/index.ts
  • apps/server/src/workflows/agentSignal/run.ts

Core Model

  • source: A normalized fact that happened. Sources come from producers such as runtime lifecycle events, user messages, or bot ingress.
  • signal: A semantic interpretation derived from one source or from another signal. Signals express meaning, routing, or policy state.
  • action: A concrete side effect planned from one signal. Actions do the work.
  • policy: An installable middleware bundle that registers source, signal, and action handlers.
  • procedure: Not a distinct runtime node. Treat "procedure" as the end-to-end flow for one use case: ingress source, matching handlers, planned actions, execution result, and observability.

Keep the boundaries strict:

  • Add a new source when the outside world produced a new event.
  • Add a new signal when the system needs a reusable semantic interpretation.
  • Add a new action when the runtime needs a concrete side effect.
  • Add or update a policy when you are wiring those pieces together.

Implementation Workflow

  1. Decide whether the use case is synchronous or quiet background work.
  2. Define or reuse a source type in packages/agent-signal/src/source/sourceTypes.ts.
  3. Define or reuse signal and action types in apps/server/src/services/agentSignal/policies/types.ts.
  4. Implement handlers with defineSourceHandler, defineSignalHandler, or defineActionHandler.
  5. Add source normalization or hydration under apps/server/src/services/agentSignal/sources/** when the producer payload needs shaping.
  6. Bundle handlers with defineAgentSignalHandlers(...).
  7. Register the policy in apps/server/src/services/agentSignal/policies/index.ts and pass it into the runtime factory if needed.
  8. Add or update ingress code that emits or enqueues the source event.
  9. For async self-iteration writes, stamp an Agent Signal operation marker and project user-visible receipts from the completion path.
  10. Add observability and tests before considering the flow complete.

Default Reading Set

  • Shared semantic core: packages/agent-signal/src/index.ts packages/agent-signal/src/base/builders.ts packages/agent-signal/src/base/types.ts packages/agent-signal/src/source/sourceTypes.ts packages/agent-signal/src/source/sourceEvent.ts
  • Server-owned runtime and middleware: apps/server/src/services/agentSignal/runtime/AgentSignalRuntime.ts apps/server/src/services/agentSignal/runtime/AgentSignalScheduler.ts apps/server/src/services/agentSignal/runtime/middleware.ts apps/server/src/services/agentSignal/runtime/context.ts
  • Existing policy example: apps/server/src/services/agentSignal/policies/analyzeIntent/index.ts apps/server/src/services/agentSignal/policies/analyzeIntent/feedbackSatisfaction.ts apps/server/src/services/agentSignal/policies/analyzeIntent/feedbackDomain.ts apps/server/src/services/agentSignal/policies/analyzeIntent/feedbackAction.ts apps/server/src/services/agentSignal/policies/analyzeIntent/actions/userMemory.ts apps/server/src/services/agentSignal/policies/analyzeIntent/actions/skillManagement.ts apps/server/src/services/agentSignal/policies/analyzeIntent/completionSkillSynthesis.ts apps/server/src/services/agentSignal/policies/completionPolicy.ts apps/server/src/services/agentSignal/services/selfIteration/completion/buildSelfIterationReceipts.ts apps/server/src/services/agentSignal/services/selfIteration/completion/selfIterationCompletionHandler.ts
  • Observability: apps/server/src/services/agentSignal/observability/projector.ts apps/server/src/services/agentSignal/observability/traceEvents.ts packages/observability-otel/src/modules/agent-signal/index.ts

Implementation Rules

  • Reuse existing source, signal, and action types before adding new ones.
  • Keep source handlers focused on interpretation and fan-out, not heavy side effects.
  • Keep action handlers responsible for side effects, idempotency, and executor-style result reporting. For memory/skill self-iteration actions, the side effect is enqueueing execAgent; the durable write and receipt projection happen after completion.
  • Use stable ids and idempotency keys when the same source can arrive more than once.
  • Preserve scope discipline. The runtime uses scopeKey to serialize related background work.
  • Prefer the dedicated shared package types and builders from @lobechat/agent-signal for normalized nodes and result contracts.
  • Do not project memory or skill receipts from the enqueue action. Use agent.execution.completed + selfIteration finalState via createSelfIterationCompletionHandler(...).
  • Add focused tests near the touched runtime, policy, or store module. Existing tests under apps/server/src/services/agentSignal/**/__test__ and **/__tests__ are the reference pattern.

References

  • Architecture and boundaries: references/architecture.md
  • Writing handlers and policies: references/handlers.md
  • Observability, metrics, and debugging: references/observability.md

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

acceptance

FreeSummary

Use this skill to verify a delivery by exercising the real product through a suitable surface such as a CLI, web app, desktop app, or iOS Simulator. It helps create or find a verification plan, capture evidence, and publish an acceptance report.

  • Verifying a completed product change
  • Collecting screenshots or other evidence
  • Creating a verification plan and report
lobehub/lobehub83.5KUpdated Oct 26, 2026

Use this skill to add an AI model provider to LobeHub across runtime integration, model cards, settings, branding, documentation, and acceptance checks. It also covers provider documentation updates and distinguishes new providers from models added to an existing provider.

  • Integrating a new AI model provider into LobeHub
  • Updating setup or usage documentation for a provider
  • Checking whether a model needs a new provider integration
lobehub/lobehub83.5KUpdated Oct 26, 2026

add-setting-env

FreeSummary

Use this skill to add a server-side environment variable that sets a default for a user setting. It walks through validation, server configuration and store merging, plus updating the example environment file and self-hosting documentation.

  • Adding an environment variable for a setting default
  • Wiring a new setting domain into server config
  • Documenting a new variable for self-hosting
lobehub/lobehub83.5KUpdated Oct 26, 2026

Provides guidance for registering hooks around an agent’s execution steps, tool calls, human approvals, context compression, and sub-agent calls. Hooks can observe events, supply local mock tool results, or use webhooks to allow or deny tool results under configured policies.

  • Observing agent steps and tool errors
  • Mocking tool results during local execution
  • Requiring webhook decisions before or after a tool call
lobehub/lobehub83.5KUpdated Oct 26, 2026

Use this skill to run end-to-end acceptance checks for bot channels in real desktop chat apps. It drives apps such as Discord, Slack, Telegram, WeChat, Lark, and QQ to send a message, wait for a response, and capture the result.

  • Checking a bot response in a real Discord channel
  • Testing chat behavior through Slack or Telegram
  • Capturing a bot interaction in a native macOS app
lobehub/lobehub83.5KUpdated Oct 26, 2026

agent-tracing

FreeSummary

Inspect recorded agent runs by operation ID to see failed tool calls, their arguments and results, available tools, execution context, and LLM inputs. The CLI also supports context maps and replaying recorded calls with different models for comparison.

  • Finding why an agent tool call failed
  • Checking which tools and context an operation received
  • Viewing the messages sent to an LLM
lobehub/lobehub83.5KUpdated Oct 26, 2026

See all skills by lobehub

Report a problem with this skill