agents.reasoning_and_critique.reflection.stateΒΆ

State schema for the Reflection Agent.

ClassesΒΆ

ReflectionAgentState

State schema for the Reflection agent.

Module ContentsΒΆ

class 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.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