# Agent Signal Pipeline

Builds agent signal sources, actions and policies for workflow handoff and deduplication.

- Repository: https://github.com/lobehub/lobehub (83676 stars)
- Category: AI and agents
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add lobehub/lobehub --skill agent-signal -g -a claude-code -y`
Codex: `npx skills add lobehub/lobehub --skill agent-signal -g -a codex -y`
Cursor: `npx skills add lobehub/lobehub --skill agent-signal -g -a cursor -y`
Gemini CLI: `npx skills add lobehub/lobehub --skill agent-signal -g -a gemini-cli -y`

## Description

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

The rest: https://github.com/lobehub/lobehub/blob/HEAD/.agents/skills/agent-signal/SKILL.md
