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: BaseModel

Create 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=())[source][source]

Build the graph with local tools and supplied tools.

Parameters:

extra_tools (Sequence[BaseTool])

Return type:

Pregel