Middleware for async subagents running on remote LangGraph servers.
Async subagents use the LangGraph SDK to launch background runs on remote LangGraph deployments. Unlike synchronous subagents (which block until completion), async subagents return a job ID immediately, allowing the main agent to monitor progress and send updates while the subagent works.
Specification for an async subagent running on a remote LangGraph server.
Async subagents connect to LangGraph deployments via the LangGraph SDK. They run as background jobs that the main agent can monitor and update.
Authentication is handled via environment variables (LANGGRAPH_API_KEY,
LANGSMITH_API_KEY, or LANGCHAIN_API_KEY), which the LangGraph SDK
reads automatically.
A tracked async subagent job persisted in agent state.
State extension for async subagent job tracking.
Middleware for async subagents running on remote LangGraph servers.
This middleware adds tools for launching, monitoring, and updating
background jobs on remote LangGraph deployments. Unlike the synchronous
SubAgentMiddleware, async subagents return immediately with a job ID,
allowing the main agent to continue working while subagents execute.
Job IDs are persisted in the agent state under async_subagent_jobs so they
survive context compaction/offloading and can be accessed programmatically.