agents.structured_output.models

Common structured output models for various agent patterns.

Classes

Analysis

Structured analysis result.

Critique

Structured critique of an output.

Decision

Structured decision output.

ExtractedData

Extracted structured data.

Improvement

Structured improvement suggestions.

Intent

User intent classification.

QualityCheck

Quality assessment result.

ReflectionResult

Complete reflection analysis.

Response

Structured response.

SearchQuery

Structured search query.

SearchResult

Structured search result.

Summary

Structured summary.

TaskResult

Result of task execution.

ValidationResult

Result of validation check.

Module Contents

class agents.structured_output.models.Analysis(/, **data)

Bases: pydantic.BaseModel

Structured analysis result.

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.structured_output.models.Critique(/, **data)

Bases: pydantic.BaseModel

Structured critique of an 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)

class agents.structured_output.models.Decision(/, **data)

Bases: pydantic.BaseModel

Structured decision 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)

class agents.structured_output.models.ExtractedData(/, **data)

Bases: pydantic.BaseModel

Extracted structured data.

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.structured_output.models.Improvement(/, **data)

Bases: pydantic.BaseModel

Structured improvement suggestions.

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.structured_output.models.Intent(/, **data)

Bases: pydantic.BaseModel

User intent classification.

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.structured_output.models.QualityCheck(/, **data)

Bases: pydantic.BaseModel

Quality assessment result.

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.structured_output.models.ReflectionResult(/, **data)

Bases: pydantic.BaseModel

Complete reflection analysis.

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.structured_output.models.Response(/, **data)

Bases: pydantic.BaseModel

Structured response.

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.structured_output.models.SearchQuery(/, **data)

Bases: pydantic.BaseModel

Structured 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)

class agents.structured_output.models.SearchResult(/, **data)

Bases: pydantic.BaseModel

Structured search result.

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.structured_output.models.Summary(/, **data)

Bases: pydantic.BaseModel

Structured summary.

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.structured_output.models.TaskResult(/, **data)

Bases: pydantic.BaseModel

Result of task execution.

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.structured_output.models.ValidationResult(/, **data)

Bases: pydantic.BaseModel

Result of validation check.

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)