haive.agents.reasoning_and_critique.reflection.state¶

State schema for the Reflection Agent.

Classes¶

ReflectionAgentState

State schema for the Reflection agent.

Module Contents¶

class haive.agents.reasoning_and_critique.reflection.state.ReflectionAgentState(/, **data)¶

Bases: haive.agents.simple.state.SimpleAgentState

State schema for the Reflection agent.

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_reflection(reflection)¶

Add a reflection result to the history.

Parameters:

reflection (haive.agents.reasoning_and_critique.reflection.models.ReflectionResult)

Return type:

None

property last_ai_message: str | None¶

Extract the last AI message content.

Return type:

str | None

property last_human_message: str | None¶

Extract the last human message content.

Return type:

str | None