This page contains reference documentation for Agents. See the docs for conceptual guides, tutorials, and examples on using Agents.
State schema for the agent.
Model request information for the agent.
Use a tool calling strategy for model responses.
Use the model provider's native structured output method.
Automatically select the best strategy for structured output.
Creates an agent graph that calls tools in a loop until a stopping condition is met.
For more details on using create_agent,
visit the [Agents](https://docs.langchain.com/oss/python/langchain/agent
Decorator used to dynamically create a middleware with the before_model hook.
Decorator used to dynamically create a middleware with the after_model hook.
Create middleware with wrap_model_call hook from a function.
Converts a function with handler callback into middleware that can intercept model calls, implement retry logic, handle errors, and rewr
Create middleware with wrap_tool_call hook from a function.
Async version is awrap_tool_call.
Converts a function with handler callback into middleware that can intercept tool calls, implement r