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.
interface AgentTypeConfig// Define a type configuration
type MyAgentTypes = AgentTypeConfig<
{ name: string; email: string }, // Response type
typeof MyStateSchema, // State schema
typeof MyContextSchema, // Context schema
typeof myMiddleware, // Middleware array
typeof myTools // Tools array
>;
// Use with ReactAgent
const agent: ReactAgent<MyAgentTypes> = createAgent({ ... });The context schema type
The middleware array type
The structured response type when using responseFormat
The custom state schema type
The combined tools type from agent and middleware