agents.planning_v2.base.modelsΒΆ
Data models for planning agents.
This module contains Pydantic models for planning agent configurations, plans, steps, and other planning-related data structures.
ClassesΒΆ
Module ContentsΒΆ
- class agents.planning_v2.base.models.Plan(/, **data)ΒΆ
Bases:
pydantic.BaseModel
,Generic
[StepType
]Generic plan model that can work with any step type.
Supports both linear and tree/split structures.
- Parameters:
data (Any)
- objectiveΒΆ
What this plan aims to accomplish
- stepsΒΆ
List of steps (can be Tasks or nested Plans)
- resultΒΆ
The outcome of the plan execution
- statusΒΆ
Current status of 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.
- add_parallel_steps(steps)ΒΆ
Add multiple steps that can be executed in parallel (same parent index).
- add_step(step)ΒΆ
Add a step with auto-indexing.
- create_subplan(objective)ΒΆ
Create a nested subplan for tree structures.
- property current_step: StepType | Plan | NoneΒΆ
The current step being executed (first in_progress or pending).
- class agents.planning_v2.base.models.StatusΒΆ
-
Status for tasks and plans.
Initialize self. See help(type(self)) for accurate signature.
- class agents.planning_v2.base.models.Task(/, **data)ΒΆ
Bases:
pydantic.BaseModel
Simple task model.
- Parameters:
data (Any)
- objectiveΒΆ
What this task aims to accomplish
- resultΒΆ
The outcome of the task (None if not completed)
- statusΒΆ
Current status of the task
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.