agents.planning.rewoo_v3.state

ReWOO V3 State Schema with computed fields for dynamic prompts.

This module defines the state schema for ReWOO V3 Agent using our proven MessagesState + computed fields pattern from Plan-and-Execute V3 success.

Classes

ReWOOV3State

State schema for ReWOO V3 with computed fields for prompt templates.

Module Contents

class agents.planning.rewoo_v3.state.ReWOOV3State(/, **data)

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

State schema for ReWOO V3 with computed fields for prompt templates.

ReWOO (Reasoning WithOut Observation) separates planning, execution, and synthesis: 1. Planner creates complete plan upfront with evidence placeholders 2. Worker executes all tool calls to collect evidence 3. Solver synthesizes all evidence into final answer

This state tracks the complete ReWOO workflow with dynamic computed fields for prompt template variable substitution.

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)

update_execution_result(execution_result)

Update with worker agent result.

Parameters:

execution_result (dict[str, Any])

Return type:

None

update_planning_result(plan_result)

Update with planner agent result.

Parameters:

plan_result (dict[str, Any])

Return type:

None

update_solution_result(solution_result)

Update with solver agent result.

Parameters:

solution_result (dict[str, Any])

Return type:

None

property available_tools: str

Formatted list of available tools for planner prompt.

Return type:

str

property evidence_summary: str

Formatted evidence for solver agent prompt.

Return type:

str

property execution_status: str

Current ReWOO workflow status for prompts.

Return type:

str

property phase_progress: str

Progress through ReWOO phases for prompts.

Return type:

str

property plan_summary: str

Formatted plan for worker agent prompt.

Return type:

str

property workflow_context: str

Complete workflow context for solver synthesis.

Return type:

str