一键导入
agent-signal
Build or extend LobeHub Agent Signal pipelines. Use for signal sources, signal/action types, policies, middleware, workflow handoff, dedupe, scope behavior, or observability.
Build or extend LobeHub Agent Signal pipelines. Use for signal sources, signal/action types, policies, middleware, workflow handoff, dedupe, scope behavior, or observability.
LobeHub React component conventions. Use when editing TSX UI, choosing base-ui vs @lobehub/ui vs antd, styling with antd-style, routing, desktop variants, layouts, or component state.
Agent runtime lifecycle hooks. Use for before/after tool or step hooks, tool mocks, human intervention, sub-agent calls, context compression, evals, tracing, callAgent, or lifecycle events.
Agent tracing CLI for execution snapshots. Use for agent-tracing, traces, snapshots, LLM call inspection, context engine data, agent step analysis, or execution debugging.
Build LobeHub builtin tool packages. Use when adding agent-callable tools, manifests, executors, runtimes, inspectors, renders, placeholders, streaming, interventions, portals, or tool registries.
Build multi-platform chat bots with the chat SDK. Use for Slack, Teams, Google Chat, Discord, GitHub, Linear bots, webhooks, mentions, slash commands, cards, modals, or streaming responses.
LobeHub data-fetching pipeline guide. Use for service layer, Zustand store, SWR, lambdaClient, useClientDataSWR, useFetchXxx hooks, or migrating useEffect fetches.
| name | agent-signal |
| description | Build or extend LobeHub Agent Signal pipelines. Use for signal sources, signal/action types, policies, middleware, workflow handoff, dedupe, scope behavior, or observability. |
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 shape:
source event -> signal interpretation -> action execution -> built-in result signals
references/architecture.md to map the package boundary, runtime queue, scope model, and async workflow handoff.references/handlers.md before writing any new policy, source handler, signal handler, or action handler.references/observability.md when you need tracing, metrics, debugging, or workflow snapshot visibility.emitAgentSignalSourceEvent(...) when a server-owned producer should execute the pipeline immediately.executeAgentSignalSourceEvent(...) when a worker or controlled backend path already owns execution timing and may inject a runtime guard backend.enqueueAgentSignalSourceEvent(...) when the caller should return quickly and let Upstash Workflow process the event out-of-band.emitAgentSignalSourceEventWithStore(...) for isolated tests or evals that should avoid ambient Redis state.Read:
src/server/services/agentSignal/index.tssrc/server/workflows/agentSignal/index.tssrc/server/workflows/agentSignal/run.tssource: 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:
source when the outside world produced a new event.signal when the system needs a reusable semantic interpretation.action when the runtime needs a concrete side effect.policy when you are wiring those pieces together.src/server/services/agentSignal/sourceTypes.ts.src/server/services/agentSignal/policies/types.ts.defineSourceHandler, defineSignalHandler, or defineActionHandler.defineAgentSignalHandlers(...).src/server/services/agentSignal/policies/index.ts and pass it into the runtime factory if needed.packages/agent-signal/src/index.ts
packages/agent-signal/src/base/builders.ts
packages/agent-signal/src/base/types.tssrc/server/services/agentSignal/runtime/AgentSignalRuntime.ts
src/server/services/agentSignal/runtime/AgentSignalScheduler.ts
src/server/services/agentSignal/runtime/middleware.ts
src/server/services/agentSignal/runtime/context.tssrc/server/services/agentSignal/policies/analyzeIntent/index.ts
src/server/services/agentSignal/policies/analyzeIntent/feedbackSatisfaction.ts
src/server/services/agentSignal/policies/analyzeIntent/feedbackDomain.ts
src/server/services/agentSignal/policies/analyzeIntent/feedbackAction.ts
src/server/services/agentSignal/policies/analyzeIntent/actions/userMemory.tssrc/server/services/agentSignal/observability/projector.ts
src/server/services/agentSignal/observability/traceEvents.ts
packages/observability-otel/src/modules/agent-signal/index.tsscopeKey to serialize related background work.@lobechat/agent-signal for normalized nodes and result contracts.src/server/services/agentSignal/**/__tests__ are the reference pattern.references/architecture.mdreferences/handlers.mdreferences/observability.md