Agent signal

From lobehub/lobehub · View interactive version

Agent signal is an AI agent skill from the GitHub repository lobehub/lobehub. Use for Agent Signal sources, actions, policies, middleware, workflow handoff and deduplication.

How to use this skill

Skill file

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

Read:

Core Model

Keep the boundaries strict:

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

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

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

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

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

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.