AI Agents · Concept
Agent Loop
Middleware adds hooks that control an agent during model calls and tool execution. It can observe, transform, retry, guard, or stop parts of the agent loop.
Last updated
Syntax
create_agent(model=..., tools=[...], middleware=[...])In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
create_agentSummarizationMiddlewareHumanInTheLoopMiddlewareLangGraphStateGraphAgentStatePIIMiddlewareModelRetryMiddleware