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

Copy
interface DeepAgentTypeConfig

Bases

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

Properties

View source on GitHub

Example

property
Context: TContext
property
Middleware: TMiddleware
property
Response: TResponse
property
State: TState
property
StreamTransformers: TStreamTransformers
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 tuple of stream transformer factories registered at createAgent({ streamTransformers }). Used to infer the shape of run.extensions on the stream returned by streamEvents(..., { version: "v3" }).

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">;