langgraph_agent_toolkit.agents.blueprints.create_agent_structured.agent module
Example create_agent agent that returns structured output.
- class langgraph_agent_toolkit.agents.blueprints.create_agent_structured.agent.ResponseSchema(*, response, alternative_response)[source][source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
response (str)
alternative_response (str)
- response: str
- alternative_response: str
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- langgraph_agent_toolkit.agents.blueprints.create_agent_structured.agent.build_graph(extra_tools=(), *, tool_selection=None, selector_model=None, extra_middleware=())[source][source]
Build the graph with local tools and supplied tools.
- Parameters:
extra_tools (Sequence[BaseTool])
tool_selection (ToolSelectionConfig | None)
selector_model (BaseChatModel | None)
extra_middleware (Sequence[AgentMiddleware])
- Return type:
Pregel