Running Subagents in the Background
Blog post from LangChain
Async subagents have been introduced to address limitations in traditional agent architecture, particularly when managing complex and lengthy tasks. Unlike inline subagents that block the supervisor agent by requiring synchronous tool calls, async subagents allow for non-blocking operations by returning a task ID immediately, enabling supervisors to manage multiple tasks simultaneously. This approach, based on the Agent Protocol, allows the supervisor to maintain control over the process by sending follow-up instructions, canceling unnecessary tasks, and providing updates mid-task, enhancing flexibility and efficiency. Async subagents operate independently with their own processes and state, offering deployment flexibility across different platforms, whether hosted on LangSmith deployments or self-hosted infrastructure. This advancement signifies a shift from a "fire-and-forget" to a "fire-and-steer" model, allowing agents to manage more complex workflows effectively.