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