agents.planning.llm_compiler_v3.modelsΒΆ
Pydantic models for LLM Compiler V3 Agent.
This module defines structured data models for the LLM Compiler pattern optimized for Enhanced MultiAgent V3 architecture.
ClassesΒΆ
Input to the LLM Compiler V3 Agent. |
|
Final output from the LLM Compiler V3 Agent. |
|
Execution plan containing tasks and their dependencies. |
|
Individual task in the LLM Compiler execution DAG. |
|
Execution mode for tasks. |
|
Result from executing a task. |
|
Request for replanning when initial plan fails. |
|
Represents a dependency between tasks. |
Module ContentsΒΆ
- class agents.planning.llm_compiler_v3.models.CompilerInput(/, **data)ΒΆ
Bases:
pydantic.BaseModel
Input to the LLM Compiler V3 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)
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class agents.planning.llm_compiler_v3.models.CompilerOutput(/, **data)ΒΆ
Bases:
pydantic.BaseModel
Final output from the LLM Compiler V3 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)
- get_failed_tasks()ΒΆ
Get only the failed tasks.
- Return type:
- get_successful_tasks()ΒΆ
Get only the successfully executed tasks.
- Return type:
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class agents.planning.llm_compiler_v3.models.CompilerPlan(/, **data)ΒΆ
Bases:
pydantic.BaseModel
Execution plan containing tasks and their dependencies.
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_executable_tasks(completed_task_ids)ΒΆ
Get tasks that can be executed now (dependencies satisfied).
- Parameters:
- Return type:
- get_join_task()ΒΆ
Get the final join task if it exists.
- Return type:
CompilerTask | None
- get_task_by_id(task_id)ΒΆ
Find task by ID.
- Parameters:
task_id (str)
- Return type:
CompilerTask | None
- validate_dependencies()ΒΆ
Validate that all dependencies reference existing tasks.
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class agents.planning.llm_compiler_v3.models.CompilerTask(/, **data)ΒΆ
Bases:
pydantic.BaseModel
Individual task in the LLM Compiler execution DAG.
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)
- can_execute_with_results(completed_tasks)ΒΆ
Check if all dependencies are satisfied.
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class agents.planning.llm_compiler_v3.models.ExecutionModeΒΆ
-
Execution mode for tasks.
Initialize self. See help(type(self)) for accurate signature.
- class agents.planning.llm_compiler_v3.models.ParallelExecutionResult(/, **data)ΒΆ
Bases:
pydantic.BaseModel
Result from executing a 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.
- Parameters:
data (Any)
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class agents.planning.llm_compiler_v3.models.ReplanRequest(/, **data)ΒΆ
Bases:
pydantic.BaseModel
Request for replanning when initial plan fails.
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)
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class agents.planning.llm_compiler_v3.models.TaskDependency(/, **data)ΒΆ
Bases:
pydantic.BaseModel
Represents a dependency between tasks.
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)
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].