Agent Architecture/Multi-Agent Patterns
Advanced10 min

Async Subagents: Background Task Delegation

Launch background subagents that run concurrently while the supervisor continues chatting — with start, check, update, cancel, and list lifecycle management.

Quick Reference

  • Async subagents run in the background while the supervisor agent continues interacting with the user
  • 5-tool lifecycle: start_async_task, check_async_task, update_async_task, cancel_async_task, list_async_tasks
  • ASGI transport: subagent runs in the same process (co-deployed, low latency)
  • HTTP transport: subagent runs on a remote Agent Server (distributed, independent scaling)
  • Supervisor delegates complex tasks and checks results when ready — no blocking
  • Each subagent gets its own context window — context isolation prevents overflow

Sync vs. Async Subagents

SupervisorContinues chattingstart_async_taskLaunchcheck_async_taskStatus?update_async_taskRefinecancel_async_taskStoplist_async_tasksAll tasksSubagentRunning inbackground

Supervisor manages background subagents via 5 lifecycle tools — continues chatting while tasks run

AspectSync SubagentAsync Subagent
ExecutionBlocks supervisor until doneRuns in background, supervisor continues
User experienceUser waits for all subtasksUser chats while tasks run
Use caseQuick, focused subtasks (<10s)Long-running tasks (research, analysis)
ComplexitySimple (function call)Lifecycle management (5 tools)
Error handlingError propagates immediatelySupervisor checks status, handles errors
When to go async

Use async subagents when the task takes >10 seconds and the user shouldn't wait. Examples: web research, code generation across multiple files, data analysis on large datasets, or any task where the user might want to give additional instructions while work is in progress.