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
JavaScriptdeepagentstypesDeepAgentTypeConfig
Interface●Since v1.4

DeepAgentTypeConfig

Type bag that extends AgentTypeConfig with subagent type information.

This interface bundles all the generic type parameters used throughout the deep agent system including subagent types for type-safe streaming and delegation.

Copy
interface DeepAgentTypeConfig

Bases

AgentTypeConfig<TResponse, TState, TContext, TMiddleware, TTools>

Example

Copy
const agent = createDeepAgent({
  middleware: [ResearchMiddleware],
  subagents: [
    { name: "researcher", description: "...", middleware: [CounterMiddleware] }
  ] as const,
});

// Type inference for streaming
type Types = InferDeepAgentType<typeof agent, "Subagents">;

Properties

property
Context: TContext

The context schema type

property
Middleware: TMiddleware

The middleware array type

property
Response: TResponse

The structured response type when using responseFormat

property
State: TState

The custom state schema type

property
Subagents: TSubagents

The subagents array type for type-safe streaming

property
Tools: TTools

The combined tools type from agent and middleware

View source on GitHub