Collaborations
Orchestrate multiple agents — sequential, router, parallel, and debate
Collaborations orchestrate multiple agents to handle one request together. Instead of one agent doing everything, you compose specialists and choose how they coordinate — sequentially, by routing, in parallel, or through a structured debate.
Every member runs through the full agent engine, so each agent's tools, knowledge, guardrails, and memory all apply.
The Four Patterns
| Pattern | How it works | Use it when |
|---|---|---|
| Sequential | Agents run in order; each receives the previous agent's output. | You have a clear pipeline of stages (gather → draft → review). |
| Router | A router agent classifies the request and forwards it to one specialist. | Different requests should go to different experts. |
| Parallel | All participants run at the same time on the same input; an optional synthesizer blends their answers. | You want multiple independent takes, then one combined answer. |
| Debate | Participants argue over rounds, each seeing the others' previous answers; an optional synthesizer renders the verdict. | The answer benefits from challenge and refinement. |
Member Roles
- Participant — a regular member. In sequential it's a pipeline stage; in parallel/debate it's one voice.
- Router — (router pattern) the agent that decides which specialist handles the request.
- Synthesizer — (parallel & debate) the final agent that blends the outputs into one answer or verdict. Optional: without one, the outputs are concatenated.
Creating a Collaboration
- Open Collaborations from the sidebar and click New Collaboration.
- Enter a name and choose a pattern.
- Add Agents as members; for sequential set the order, for router set one member's role to router and add routing keywords to each specialist.
- Click Create (starts as draft), then Activate, then Execute to run it — with a live step-by-step trace.
Controlling Cost
Collaborations can call many agents, so they include cost guards (Edit → Cost & context):
- Max tokens / run — the run stops before the next member once this many tokens are used (default 300,000;
0= unlimited). You still get the partial result. - Max members — an over-limit run is rejected before spending anything (default 12).
- Context char budget (sequential, with Pass full context) — bounds how much prior-step text each stage receives, so long pipelines don't balloon.
The live trace shows tokens spent so far as the run progresses.
Making Collaborations Reliable
Each member has optional per-member settings:
- Retries — retry a member on a transient error (e.g. a tool timeout) up to N times.
- Optional — if this member fails, don't abort the run: record the failure, keep the last good output, and continue.
- Failure markers — phrases that mean the step actually failed even if the agent replied without an error (e.g.
could not access, 404). If a required member's output contains one, the run halts with a clear reason instead of passing a wrong result downstream — preventing "false success".
Pattern-Specific Settings
- Router — custom classifier prompt, default specialist (fallback), and a visible routing decision + reason in the trace.
- Debate — number of rounds (1–5); add a synthesizer for the final verdict.
- Parallel — add a synthesizer to merge the parallel answers into one.
Tips
- Start with sequential or router — the simplest and cheapest.
- Use failure markers on any step whose "success" could be misleading.
- Mark flaky or non-critical members optional so one hiccup doesn't sink the whole run.
- For parallel and debate, add a synthesizer if you want one clean answer.