LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsindexAsyncSubAgent
Interface●Since v1.9

AsyncSubAgent

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.

Copy
interface AsyncSubAgent

Used in Docs

  • Async subagents

Properties

property
description: string

What this subagent does. The main agent uses this to decide when to delegate.

property
graphId: string

The graph name or assistant ID on the Agent Protocol server.

property
headers: Record<string, string>

Additional headers to include in requests to the server (e.g. for custom auth).

property
name: string
property
url: string

URL of the Agent Protocol server. Defaults to the LangGraph SDK's default endpoint.

View source on GitHub