LangChain adds background AI workers so the main agent can keep responding
Developers can start, redirect and cancel delegated work. Staying reachable does not mean every instruction immediately changes a running task.
Loading page…
Developers can start, redirect and cancel delegated work. Staying reachable does not mean every instruction immediately changes a running task.
Listen to this story
LangChain has added asynchronous subagents to Deep Agents in Python, JavaScript, and its managed service, letting a coordinating agent delegate work without waiting for it to finish. The feature adds controls to check, revise, cancel, and list workers; results can wake an idle coordinator or be collected during an active run. The coordinator is not always interruptible: user approvals retain priority, and task notifications remain in beta with an API that may change.
The five lifecycle tools are start_async_task, check_async_task, update_async_task, cancel_async_task, and list_async_tasks.
Instruction updates default to interrupting and restarting a worker; enqueue instead applies the change after its current run.
If the coordinator is awaiting user approval, worker results wait until the user responds; workers needing approval use their own thread.
An AI assistant that accepts a long assignment should not disappear until it finishes. LangChain’s November 5 introduction of async subagents brings that design to Deep Agents: background workers handle delegated tasks while a coordinating agent stays available. There is a boundary, though: users can reach that coordinator when its own processing loop is not busy.
The change targets a bottleneck in how agents work. A model typically chooses a tool, waits for its answer and then decides what to do next. A slow tool or delegated assignment can hold up that sequence. LangChain’s new arrangement separates the orchestrator—the main agent that talks to the user—from subagents that carry out longer assignments.
Async, short for asynchronous, means the handoff returns immediately rather than waiting for the worker’s answer. The assignment continues independently, and its result arrives later. The orchestrator can start more work as requests arrive instead of waiting for an entire batch to finish. It also keeps the conversation’s context organized while those assignments run elsewhere.
LangChain gives the orchestrator five tools to manage the work it delegates, covering the task’s lifecycle rather than just the initial handoff:
Reaching the orchestrator and changing a worker’s instructions are separate operations. The default update strategy, interrupt, stops the worker’s current run and restarts it with the new instruction. LangChain gives a correction such as switching to Postgres as an example. The alternative, enqueue, holds the follow-up until the current run finishes—appropriate for an addition such as running tests afterward.
Every unfinished task appears in the orchestrator’s system prompt, the instructions it receives as it works. The orchestrator can check progress itself, or workers can report back. When the orchestrator is busy, it checks unfinished tasks before each model call and can pick up completed results mid-run. When idle, a completed subagent wakes it by starting a new run.
An outstanding approval changes that timing. If the orchestrator is paused for a user’s answer, a worker’s result does not disturb the approval; it arrives after the user responds. A subagent that needs approval is marked waiting, and the user answers on that worker’s own thread without interrupting the orchestrator. In Managed Deep Agents on Slack, the approval request returns to the original thread.
Async subagents are available in Deep Agents for Python and JavaScript, and in Managed Deep Agents. In the managed service, developers enable the behavior with an async field on a subagent definition. Every served agent also gets an async copy of the general-purpose subagent, allowing it to choose foreground or background delegation at runtime. Task notifications remain in beta, and LangChain cautions that their API may change.
Loading discussion...
Join the conversation
Explain when you would favor changing course over finishing the current task.
Be the first to share a perspective or an experience.
Reader comments
Newest comments first. Replies stay oldest first.