agents.reflection.state¶
State schema for Reflection Agent.
Classes¶
State for Reflection Agent. |
Functions¶
|
Add improvement to reflection state (module-level function). |
|
Finalize the reflection process (module-level function). |
|
Check if reflection should continue (module-level function). |
Module Contents¶
- class agents.reflection.state.ReflectionState(/, **data)¶
Bases:
haive.core.schema.prebuilt.multi_agent_state.MultiAgentState
State for 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_improvement(improvement)¶
Add improvement and update current content.
- Parameters:
improvement (haive.agents.reflection.models.Improvement)
- Return type:
None
- agents.reflection.state.add_improvement(state, improvement)¶
Add improvement to reflection state (module-level function).
- Parameters:
state (ReflectionState)
improvement (haive.agents.reflection.models.Improvement)
- Return type:
None
- agents.reflection.state.finalize(state)¶
Finalize the reflection process (module-level function).
- Parameters:
state (ReflectionState)
- Return type:
- agents.reflection.state.should_continue(state)¶
Check if reflection should continue (module-level function).
- Parameters:
state (ReflectionState)
- Return type: