agents.planning.plan_execute_v3.state

State schema for Plan-and-Execute V3 Agent.

This module defines the state schema used by the Plan-and-Execute V3 agent, extending MessagesState with computed fields for plan tracking.

Classes

PlanExecuteV3State

State schema for Plan-and-Execute V3 agent.

Module Contents

class agents.planning.plan_execute_v3.state.PlanExecuteV3State(/, **data)

Bases: haive.core.schema.prebuilt.messages_state.MessagesState

State schema for Plan-and-Execute V3 agent.

This state is shared across the planner, executor, evaluator, and replanner sub-agents to maintain full context throughout the execution.

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)

add_evaluation(evaluation)

Add an evaluation result.

Parameters:

evaluation (agents.planning.plan_execute_v3.models.PlanEvaluation)

Return type:

None

add_step_execution(execution)

Add a step execution result and update plan.

Parameters:

execution (agents.planning.plan_execute_v3.models.StepExecution)

Return type:

None

revise_plan(new_plan)

Replace current plan with a revised version.

Parameters:

new_plan (agents.planning.plan_execute_v3.models.ExecutionPlan)

Return type:

None

property current_step: str | None

Get the current step description for the executor.

Return type:

str | None

property execution_summary: str

Get a summary of the entire execution.

Return type:

str

property execution_time: float | None

Total execution time in seconds.

Return type:

float | None

property key_findings: list[str]

Extract key findings from executions.

Return type:

list[str]

property objective: str

Extract the objective from the plan or messages.

Return type:

str

property plan_status: str

Get formatted plan status for agents.

Return type:

str

property previous_results: str

Get formatted previous step execution results.

Return type:

str

property should_evaluate: bool

Determine if we should run evaluation.

Return type:

bool