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

Chat LangChain

What can I help with?

Enter to send·Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsvaluesdeepAgentStateSchema
Function●Since v1.17

deepAgentStateSchema

The state schema of a deep agent or subagent: the caller's fields, plus the delta channels for every key the caller leaves out.

A zod schema is copied field by field the way LangChain's createAgent reads one, keeping reducers registered on zod v4 fields, because a StateSchema cannot hold a zod object. Anything else createAgent ignores, so it is ignored here too. This follows createAgentState in langchain 1.6.0 (dist/agents/annotation.js); recheck it when langchain changes how it reads a state schema.

Copy
deepAgentStateSchema(stateSchema: InteropZodObject | AnyStateSchema): AnyStateSchema

Parameters

NameTypeDescription
stateSchemaInteropZodObject | AnyStateSchema
View source on GitHub