agent-signal

Implements event-driven Agent Signal pipelines with sources, signals, actions, and policies.

74|11|Updated Jul 4, 2024
One-click install
npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill agent-signal-opensourceagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-signal
Source: https://github.com/OpenSourceAGI/qwksearch-research-agent/tree/main/apps/qwk-in-lobe/.agents/skills/agent-signal
Command: npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill agent-signal-opensourceagi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building background, event-driven agent work without coupling it to the foreground chat request is hard to structure consistently. This Skill provides the architecture, handler patterns, and observability guidance needed to extend the LobeHub Agent Signal runtime correctly. ## Core Features & Use Cases - Pipeline Construction: Define sources, signals, actions, and policies using the shared @lobechat/agent-signal builders and server middleware helpers. - Async Self-Iteration: Enqueue execAgent runs for memory and skill writes, then project user-visible receipts from agent.execution.completed events. - Observability & Debugging: Use OTEL metrics, trace projection, and workflow snapshot bridges to inspect chains and diagnose dedupe, scope, or handler issues. - Use Case: When adding a new background behavior—such as analyzing user feedback to update agent memory—use this Skill to register the right source handler, signal router, and action executor with proper idempotency and scope discipline. ## Quick Start Use the agent-signal skill to add a new source handler and policy for processing user message events in the Agent Signal runtime.

Frequently Asked Questions about agent-signal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new Agent Signal source handler?

Use defineSourceHandler from the runtime middleware, specifying the source type, a stable handler id, and an async function returning a dispatch result with signals. Register it in a policy via defineAgentSignalHandlers and wire the policy into the runtime factory.

What is the difference between a source, signal, and action?

A source is a normalized external fact like a user message, a signal is a reusable semantic interpretation derived from sources, and an action is a concrete side effect executed by the runtime. Keep interpretation in source and signal handlers and side effects in action handlers.

When should I use enqueueAgentSignalSourceEvent instead of emit?

Use enqueueAgentSignalSourceEvent when the caller should return quickly and the work should run out-of-band via Upstash Workflow. Use emitAgentSignalSourceEvent when a server-owned producer should execute the pipeline immediately in the foreground.

Why are memory or skill receipts missing after an action applied?

Receipts are projected from the agent.execution.completed event, not the enqueue action. Verify the action stamped an Agent Signal operation marker, the completion payload carried selfIteration finalState, and buildSelfIterationReceipts recognized the mutation.

How does Agent Signal prevent duplicate action execution?

The runtime uses scopeKey-based dedupe windows, scope locks, and action idempotency checks in handlers. Keep dedupe keys and scope keys stable across retries and workflow handoff to avoid double execution.