agents.planning.plan_and_execute.v2.models

Models for Plan and Execute Agent v2.

Classes

Act

Action to take - either respond or create new plan.

ExecutionResult

Result of executing a step.

Plan

A plan containing steps to execute.

Response

Final response to user.

Step

A step in the plan.

Module Contents

class agents.planning.plan_and_execute.v2.models.Act(/, **data)

Bases: pydantic.BaseModel

Action to take - either respond or create new plan.

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.planning.plan_and_execute.v2.models.ExecutionResult(/, **data)

Bases: pydantic.BaseModel

Result of executing a 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.planning.plan_and_execute.v2.models.Plan(/, **data)

Bases: pydantic.BaseModel

A plan containing steps to execute.

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)

get_next_step()

Get the next incomplete step.

Return type:

Step | None

update_status()

Update plan status based on step completion.

Return type:

None

class agents.planning.plan_and_execute.v2.models.Response(/, **data)

Bases: pydantic.BaseModel

Final response to user.

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.planning.plan_and_execute.v2.models.Step(/, **data)

Bases: pydantic.BaseModel

A step in the plan.

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_result(result)

Add result and mark step as complete.

Parameters:

result (str)

Return type:

None

is_complete()

Check if step is complete.

Return type:

bool