Specification for an async subagent running on a remote Agent Protocol server.
Async subagents connect to any Agent Protocol-compliant server via the LangGraph SDK. They run as background tasks that the main agent can monitor and update.
Compatible with LangGraph Platform (managed) and self-hosted servers.
Authentication for LangGraph Platform is handled automatically by the SDK
via environment variables (LANGGRAPH_API_KEY, LANGSMITH_API_KEY, or
LANGCHAIN_API_KEY). For self-hosted servers, pass custom auth via headers.
Subagents on this deployment (no url) nest under the parent's trace when tracing is on.
Each task's thread has parent_thread_id metadata naming the parent's thread, so
an app can list a parent's subagent threads with the LangGraph SDK:
client.threads.search({ metadata: { parent_thread_id } }).
interface AsyncSubAgentWhat this subagent does. The main agent uses this to decide when to delegate.
The graph name or assistant ID on the Agent Protocol server.
Additional headers to include in requests to the server (e.g. for custom auth).
What the subagent starts with. Defaults to "isolated".
"isolated": only the delegated task description."fork": a snapshot of the parent's conversation at launch, followed by
the task description, for background work.Fork mode copies conversation history, not the parent's model, prompt, tools or middleware; match them on the remote agent for prompt-cache reuse.
Media the parent offloaded with offloadBinaryContent is forked as references:
the subagent must be a deep agent, and shares the parent's backend to see it.
mode: "fork" may change in a future release.
Unique identifier for the async subagent.
Whether this subagent may wake this agent when it finishes while this agent is idle. Defaults to true.
Set it to false when the application delivers results itself, for example
through webhook. This agent still sees the subagent's updates while it runs.
notifyParent may change along with how subagents wake their parent.
How update_async_task sends a follow-up while a run is active. Defaults to "interrupt".
"interrupt": stop the current run and start the follow-up."enqueue": queue the follow-up behind the current run. The task is pending
until the follow-up starts. If the current run stops to ask its user for
approval or input, the follow-up still starts, and that request is dropped.updateStrategy may change along with how queued follow-ups are tracked.
URL of the Agent Protocol server. Omit for a subagent on the same Agent Server deployment, which gives running graphs its address; elsewhere, defaults to the LangGraph SDK's default endpoint.
URL the Agent Server calls whenever a run of this subagent finishes.