Docs navigation
Guides

Set up an orchestration

This guide builds an orchestration with bb: members, the hand-offs between them, and the triggers that start it. The examples use a support desk with a Triage agent that hands work to a Refunds agent.

Create the orchestration

bash
bb orch create "Support desk" --agent Triage --agent Refunds --use

# Add or remove members later; removing one keeps the agent
bb orch agent add "Order lookup"
bb orch agent list
bb orch agent remove "Order lookup"

Add hand-offs

An edge lets one member hand work to another. Its description tells the sending agent what to hand over and when, so write it as an instruction.

bash
bb orch edge set Triage Refunds -d "Refund requests, with the order number"

Start it on a schedule

A schedule uses standard 5-field cron, in UTC. It starts the agents you name with the message you give them.

bash
bb orch schedule set "0 9 * * 1-5" --start Triage -m "Go through the overnight queue"
bb orch schedule list

# Fire it once now (starts real, billable runs)
bb orch schedule test <schedule>

Start it from an app event

An app event trigger uses the orchestration's account for the app. With no account yet, bb prints a link to connect one. Start in test mode, check what it fired, then switch it on.

bash
# Find a trigger and what it takes
bb orch trigger catalog list --app gmail
bb orch trigger catalog get gmail-new-email-received

bb orch trigger add gmail-new-email-received --start Triage -m "Sort the new email" --test-mode
bb orch trigger runs gmail-new-email-received
bb orch trigger set gmail-new-email-received --on

Share tools and secrets

MCP servers and secrets set on the orchestration reach every member. An agent's own value of the same name wins.

bash
bb orch secret set ZENDESK_TOKEN
bb orch tool mcp add zendesk --url https://mcp.example.com/zendesk --oauth