agents.planning.p_and_e.state

State schemas for Plan and Execute Agent System.

This module defines the state schemas used by the planning, execution, and replanning agents.

Classes

PlanExecuteState

Main state schema for the Plan and Execute agent system.

Module Contents

class agents.planning.p_and_e.state.PlanExecuteState(messages=None, **data)

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

Main state schema for the Plan and Execute agent system.

This state is shared across planning, execution, and replanning agents to maintain the full context of the operation.

Initialize with optional messages parameter for compatibility.

Parameters:

messages (list[dict[str, Any]] | None)

property current_step: str | None

Get the current step formatted for the executor.

Return type:

str | None

property execution_time: float | None

Total execution time in seconds.

Return type:

float | None

property objective: str

Get the objective from the plan or messages.

Return type:

str

property plan_status: str

Get the plan status formatted for the executor.

Return type:

str

property previous_results: str

Get previous execution results formatted for the executor.

Return type:

str

property should_replan: bool

Determine if replanning is needed.

Return type:

bool