agents.reasoning_and_critique.reflection.models

Models for the Reflection Agent.

Classes

ReflectionOutput

Model for the output of the reflection step.

ReflectionResult

Model for structured reflection output.

SearchQuery

Model for a search query.

Module Contents

class agents.reasoning_and_critique.reflection.models.ReflectionOutput(/, **data)

Bases: pydantic.BaseModel

Model for the output of the reflection step.

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)

class agents.reasoning_and_critique.reflection.models.ReflectionResult(/, **data)

Bases: pydantic.BaseModel

Model for structured reflection output.

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)

as_message()

Convert to a message format.

Return type:

dict[str, Any]

property normalized_score: float

Return the score normalized to 0-1.

Return type:

float

class agents.reasoning_and_critique.reflection.models.SearchQuery(/, **data)

Bases: pydantic.BaseModel

Model for a search query.

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)