Examples
Multi-Agent Workflow
Chain multiple agents so events flow through a pipeline: request → planner → executor → client.
Pattern
const main = mainChannel;
const processing = createChannel('processing');
const client = createChannel('client').proxy(proxy.sse());
registerAgent(plannerAgent).subscribe(main).publishTo(processing);
registerAgent(executorAgent).subscribe(processing).publishTo(client);Example Structure
Create two (or more) agents with compatible events:
- Planner — Listens to
request, emitsplan-readywith a plan payload - Executor — Listens to
plan-ready, emitsagent-responsewith the result
Each agent is built with AgentFactory and registered with subscribe/publishTo to form the chain.
Location
The core-example can be extended to add a second agent. See Patterns: Agent Chain for the full pattern.