Skip to main content
When a single agent isn’t enough, AFK lets you orchestrate teams of specialist agents using delegation DAGs — directed acyclic graphs where a coordinator fans out work, collects results, and combines them.

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

1

Plan

The coordinator decides which subagents to call and in what order, based on the user’s request and its instructions.
2

Validate

AFK validates the delegation request: does the subagent exist? Are the arguments valid? Does the policy allow it?
3

Schedule

The subagent is enqueued for execution. With fan-out, multiple subagents can run in parallel.
4

Execute

Each subagent runs a full agent loop (LLM calls, tool execution, etc.) and returns an AgentResult.
5

Aggregate

Results are collected according to the join policy. The coordinator receives them and decides whether to delegate more or produce a final response.

Join policies

When multiple subagents run in parallel (fan-out), the join policy controls how the coordinator handles results:
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

Backpressure

AFK limits concurrent subagent executions to prevent resource exhaustion:
When the concurrency limit is reached, additional subagent calls are queued and execute as slots become available.

When to use multi-agent delegation

Next steps

Agentic Levels

Capability maturity model — when to add agents.

Architecture

How orchestration and execution are separated.