interface DeepAgentTypeConfigAgentTypeConfig<TResponse, TState, TContext, TMiddleware, 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
const agent = createDeepAgent({
middleware: [ResearchMiddleware],
subagents: [
{ name: "researcher", description: "...", middleware: [CounterMiddleware] }
] as const,
});
// Type inference for streaming
type Types = InferDeepAgentType<typeof agent, "Subagents">;