agents.planning.langgraph_plan_execute¶
LangGraph Plan and Execute Implementation.
Following the official LangGraph tutorial pattern: https://langchain-ai.github.io/langgraph/tutorials/plan-and-execute/plan-and-execute/
Classes¶
Action to perform - either respond or continue. |
|
A plan to follow for solving a task. |
|
State for the plan-and-execute agent. |
|
Response to user. |
Functions¶
|
Create Plan and Execute agent following official LangGraph tutorial. |
|
Create a Plan and Execute agent with default settings. |
|
Route after replanning. |
|
Decide whether to continue executing the plan or finish. |
Module Contents¶
- class agents.planning.langgraph_plan_execute.Act(/, **data)¶
Bases:
pydantic.BaseModel
Action to perform - either respond or continue.
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:
data (Any)
- class agents.planning.langgraph_plan_execute.Plan(/, **data)¶
Bases:
pydantic.BaseModel
A plan to follow for solving a task.
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:
data (Any)
- class agents.planning.langgraph_plan_execute.PlanExecuteState(messages=None, **data)¶
Bases:
haive.core.schema.prebuilt.messages.messages_state.MessagesState
State for the plan-and-execute agent.
Initialize with optional messages parameter for compatibility.
- class agents.planning.langgraph_plan_execute.Response(/, **data)¶
Bases:
pydantic.BaseModel
Response to user.
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:
data (Any)
- agents.planning.langgraph_plan_execute.create_langgraph_plan_execute(name='PlanExecute', model='gpt-4o-mini', tools=None)¶
Create Plan and Execute agent following official LangGraph tutorial.
- agents.planning.langgraph_plan_execute.create_plan_execute_agent(tools=None)¶
Create a Plan and Execute agent with default settings.
- Parameters:
tools (list | None)
- Return type:
haive.agents.multi.archive.enhanced_base.MultiAgentBase
- agents.planning.langgraph_plan_execute.route_replan(state)¶
Route after replanning.
- Parameters:
state (PlanExecuteState)
- Return type:
- agents.planning.langgraph_plan_execute.should_continue(state)¶
Decide whether to continue executing the plan or finish.
- Parameters:
state (PlanExecuteState)
- Return type: