/agent-bus:agent-coordination-patternsfrom agent-bus
Use when designing multi-agent workflows, implementing task distribution, or orchestrating parallel work - provides proven patterns for agent coordination
Ships in agent-bus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Design patterns for coordinating multiple AI agents using the message bus.
One coordinator dispatches tasks to multiple workers.
# Coordinator registers
bus_register_agent(agent_id="coordinator", session_id="...")
bus_create_channel(name="tasks", description="Task queue")
bus_create_channel(name="results", description="Task results")
# Workers register
bus_register_agent(agent_id="worker-1", session_id="...")
bus_subscribe(agent_id="worker-1", channel="tasks")
# Coordinator sends task
bus_send(channel="tasks", content='{"id": "task-1", "type": "test", "files": [...]}')
# Worker receives and processes
messages = bus_receive(channel="tasks")
# ... process task ...
bus_acknowledge(message_id="...", agent_id="worker-1")
bus_send(channel="results", content='{"task_id": "task-1", "status": "done"}')
# Coordinator collects results
results = bus_receive(channel="results")
Agents react to events without direct coordination.
bus_create_channel(name="events/file-changed")
bus_create_channel(name="events/test-failed")
bus_create_channel(name="events/build-complete")
# Publisher (e.g., file watcher agent)
bus_send(channel="events/file-changed", content='{"file": "src/main.ts"}')
# Subscribers react independently
# Test agent: re-runs relevant tests
# Lint agent: re-checks the file
# Doc agent: updates if API changed
Chain of agents process data sequentially.
[Input] -> [Agent A: Parse] -> [Agent B: Validate] -> [Agent C: Transform] -> [Output]
bus_create_channel(name="pipeline/stage-1")
bus_create_channel(name="pipeline/stage-2")
bus_create_channel(name="pipeline/stage-3")
bus_create_channel(name="pipeline/complete")
# Stage 1 agent
input = bus_receive(channel="pipeline/stage-1")
result = process(input)
bus_send(channel="pipeline/stage-2", content=result)
# Stage 2 agent
input = bus_receive(channel="pipeline/stage-2")
result = validate(input)
bus_send(channel="pipeline/stage-3", content=result)
# ... etc
Multiple agents compete for tasks (load balancing).
# Multiple workers subscribe to same channel
# First to acknowledge gets the task
messages = bus_receive(channel="tasks", limit=1)
if messages:
success = bus_acknowledge(message_id=messages[0].id, agent_id="worker-N")
if success:
# We got it, process
else:
# Another worker got it first
Coordinate multi-step operations with compensation on failure.
# Create saga channel
bus_create_channel(name="saga-order-123")
# Step 1: Reserve inventory
bus_send(channel="saga-order-123", content='{"step": 1, "action": "reserve", "status": "pending"}')
# ... agent processes, updates status ...
# Step 2: Charge payment
bus_send(channel="saga-order-123", content='{"step": 2, "action": "charge", "status": "pending"}')
# If step fails, compensate
bus_send(channel="saga-order-123", content='{"step": 1, "action": "release", "status": "compensating"}')
Don't have agents endlessly reply to each other.
Always acknowledge messages you've processed.
Set reasonable expiration times.
Don't make one agent critical to all operations.
Check bus health:
# List active agents
bus_list_agents(active_within_seconds=60)
# Check channel activity
bus_receive(channel="status", limit=20)
# Review errors
bus_receive(channel="errors", limit=10)
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (slapglif/agent-bus) — no native marketplace selected
npx claudepluginhub p/slapglif-agent-bus3 skills in this plugin
/agent-coordination-protocolUse when implementing the Agent Coordination Protocol (ACP) for multi-agent coordination - provides standardized message types, consensus mechanisms, and task handoff automation workflows/agent-message-busUse when coordinating between multiple agents, sending messages across sessions, or implementing multi-agent workflows - provides patterns for pub/sub, request/response, and broadcast communication