The structured response type when using responseFormat.
Defaults to Record<string, any>. Set to ResponseFormatUndefined when no
response format is configured.
The custom state schema type. Can be an AnnotationRoot,
InteropZodObject, or undefined. The state persists across agent invocations
when using a checkpointer.
The context schema type. Context is read-only and not
persisted between invocations. Defaults to AnyAnnotationRoot.
The middleware array type. Must be a readonly array
of AgentMiddleware instances.
The combined tools type from both createAgent tools parameter
and middleware tools. This is a readonly array of ClientTool | ServerTool.
Type bag that encapsulates all agent type parameters.
This interface bundles all the generic type parameters used throughout the agent system into a single configuration object. This pattern simplifies type signatures and makes it easier to add new type parameters without changing multiple function signatures.
Example