Quick example
Delegation DAG model
The coordinator makes all delegation decisions. Subagents don’t talk to each other directly — they report back to the coordinator, which decides what to do next.Orchestration pipeline
Plan
The coordinator decides which subagents to call and in what order, based on
the user’s request and its instructions.
Validate
AFK validates the delegation request: does the subagent exist? Are the
arguments valid? Does the policy allow it?
Schedule
The subagent is enqueued for execution. With fan-out, multiple subagents can
run in parallel.
Execute
Each subagent runs a full agent loop (LLM calls, tool execution, etc.) and
returns an
AgentResult.Join policies
When multiple subagents run in parallel (fan-out), the join policy controls how the coordinator handles results:- all_required (default)
- allow_optional_failures
- first_success
- quorum
All subagents must succeed. Any failure fails the entire delegation batch.Use when: Every subagent’s output is essential for the final result.
Failure handling
| Failure | all_required | allow_optional_failures | first_success | quorum |
|---|---|---|---|---|
| One subagent fails | Batch fails | Continue with others | Continue waiting | Continue if quorum not needed |
| All subagents fail | Batch fails | Batch fails | Batch fails | Batch fails |
| Timeout | Batch fails | Use available results | Batch fails | Depends on completed count |
Backpressure
AFK limits concurrent subagent executions to prevent resource exhaustion:When to use multi-agent delegation
| Scenario | Single agent | Multi-agent |
|---|---|---|
| Simple Q&A or classification | Overkill | |
| Task needs different expertise | Consider | |
| Need to parallelize work | N/A | |
| Task needs consensus/verification | N/A | |
| Tight latency budget | (fewer LLM calls) | (more LLM calls) |