Core TypeScript type definitions for deep agents. These types are useful when building custom middleware, backends, or extending agent functionality.
The main types for working with deep agents:
DeepAgent - The compiled agent graph returned by createDeepAgentCreateDeepAgentParams - Configuration options for createDeepAgentMergedDeepAgentState - The agent's internal state shapeTypes for defining and working with subagents:
SubAgent - Configuration object for defining a subagentCompiledSubAgent - Wrapper for using a pre-compiled LangGraph as a subagentTypes for implementing custom backends:
BackendProtocol - Interface that all backends must implementBackendFactory - Factory function type for creating backendsFileData / FileInfo - File metadata typesEditResult / WriteResult - Operation result typesType bag that extends AgentTypeConfig with subagent type information.
Default type configuration for deep agents.
Configuration parameters for creating a Deep Agent
Specification for a subagent that can be dynamically created.
Type definitions for pre-compiled agents.
Structured file listing info.
Result from backend edit operations.
Result from backend write operations.
DeepAgent extends ReactAgent with additional subagent type information.
Combined state type including custom middleware and subagent middleware states
Union of v1 and v2 file data formats.
Factory function type for creating backend instances.