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
JavaScriptdeepagentsnodeDeepAgent
Interface●Since v1.10

DeepAgent

Copy
interface DeepAgent

Bases

ReactAgent<TTypes>

Properties

Methods

View source on GitHub

Example

Copy
const agent: DeepAgent<DeepAgentTypeConfig<...>> = createDeepAgent({ ... });

// Access subagent types for streaming
type Subagents = InferDeepAgentSubagents<typeof agent>;
property
~deepAgentTypes: TTypes
property
options: CreateAgentParams<TTypes["Response"], TTypes["State"], TTypes["Context"]>
property
streamEvents: (state: InvokeStateParameter<TTypes>, config: InvokeConfiguration<InferContextInput<TTypes["Context"] extends InteropZodObject | AnyAnnotationRoot ? any[any] : AnyAnnotationRoot> & InferMiddlewareContextInputs<TTypes["Middleware"]>> & __type) => Promise<DeepAgentRunStream<Awaited<InferSchemaValue<TTypes["State"]> & TTypes["Response"] extends ResponseFormatUndefined ? Omit<BuiltInState<MessageStructure<ToolsToMessageToolSet<...>>>, "jumpTo"> : Omit<BuiltInState<MessageStructure<...>>, "jumpTo"> & __type & InferMiddlewareStates<TTypes["Middleware"]>>, readonly [TTypes["Tools"], BuiltinToolPlaceholder<"write_todos"> | BuiltinToolPlaceholder<"ls"> | BuiltinToolPlaceholder<"read_file"> | BuiltinToolPlaceholder<"write_file"> | BuiltinToolPlaceholder<"edit_file"> | BuiltinToolPlaceholder<"glob"> | BuiltinToolPlaceholder<"grep"> | BuiltinToolPlaceholder<"execute"> | BuiltinToolPlaceholder<"task"> | BuiltinToolPlaceholder<"start_async_task"> | BuiltinToolPlaceholder<"check_async_task"> | BuiltinToolPlaceholder<"update_async_task"> | BuiltinToolPlaceholder<"cancel_async_task"> | BuiltinToolPlaceholder<"list_async_tasks">], TTypes["Subagents"], InferDeepAgentStreamExtensions<TTypes["StreamTransformers"]>>> & (state: InvokeStateParameter<TTypes>, config: InvokeConfiguration<InferContextInput<TTypes["Context"] extends InteropZodObject | AnyAnnotationRoot ? any[any] : AnyAnnotationRoot> & InferMiddlewareContextInputs<TTypes["Middleware"]>> & __type) => Promise<AgentRunStream<MergedAgentState<TTypes>, TTypes["Tools"], InferStreamExtensions<TTypes["StreamTransformers"]>>>
property
checkpointer
property
graph
property
store
method
drawMermaid
method
drawMermaidPng
method
invoke
method
stream
method
withConfig

DeepAgent extends ReactAgent with additional subagent type information.

This type wraps ReactAgent but includes the DeepAgentTypeConfig which contains subagent types for type-safe streaming and delegation.