Dispatch work to sub-agents concurrently and collect results asynchronously.
The background agents tool lets an orchestrator dispatch work to sub-agents concurrently and collect results asynchronously. Unlike transfer_task — which blocks until the sub-agent finishes — background agent tasks run in parallel. The orchestrator can start several tasks, do other work, and check on them later.
agents: root: model: anthropic/claude-sonnet-4-0 description: Research coordinator that dispatches work in parallel instruction: | You are a research coordinator. When the user asks a question: 1. Break the question into independent research tasks. 2. Dispatch each task using run_background_agent so they run in parallel. 3. Use list_background_agents or view_background_agent to check progress. 4. Synthesize the findings into a clear, well-structured answer. Always run independent tasks concurrently. sub_agents: [web_researcher, code_analyst] toolsets: - type: think - type: background_agents web_researcher: model: openai/gpt-4o description: Searches the web for information and summarizes findings instruction: Search the web for relevant, up-to-date information. toolsets: - type: mcp ref: docker:duckduckgo code_analyst: model: anthropic/claude-sonnet-4-0 description: Analyzes local code and provides technical insights instruction: Read the codebase to answer technical questions. toolsets: - type: filesystem - type: shell
Use background_agents when your orchestrator needs to fan out work to multiple specialists — for example, researching several topics simultaneously or running independent code analyses side by side. Use transfer_task when you need the result before continuing.