LangChain · Class
ToolCallLimitMiddleware
toolCallLimitMiddleware limits how many tool calls an agent can make. It can count calls per run or across a thread and can continue, end, or raise an error when a limit is reached.
Last updated
Syntax
toolCallLimitMiddleware(options): AgentMiddlewareIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
ToolCallLimitExceededErrorcreateAgentAgentMiddlewareToolMessage