LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Configuration
  • 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

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsConfigurationTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentstypesDeepAgentTypeConfig
Interface●Since v1.4

DeepAgentTypeConfig

Copy
interface DeepAgentTypeConfig

Bases

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

Properties

View source on GitHub

Example

property
Context: TContext
property
Middleware: TMiddleware
property
Response: TResponse
property
State: TState
property
Subagents: TSubagents
property
Tools: TTools

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.

The context schema type

The middleware array type

The structured response type when using responseFormat

The custom state schema type

The subagents array type for type-safe streaming

The combined tools type from agent and middleware

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

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