agents.planning.llm_compiler_v3.state

State schema for LLM Compiler V3 Agent.

Classes

LLMCompilerStateSchema

State schema for LLM Compiler V3 Agent using Enhanced MultiAgent V3.

Module Contents

class agents.planning.llm_compiler_v3.state.LLMCompilerStateSchema(/, **data)

Bases: haive.core.schema.prebuilt.messages_state.MessagesState

State schema for LLM Compiler V3 Agent using Enhanced MultiAgent V3.

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

Add a task execution result to state.

Parameters:

result (haive.agents.planning.llm_compiler_v3.models.ParallelExecutionResult)

Return type:

None

can_execute_more_tasks()

Check if more tasks can be executed in parallel.

Return type:

bool

get_execution_summary()

Get comprehensive execution summary.

Return type:

dict[str, Any]

get_failed_results()

Get all failed execution results.

Return type:

list[haive.agents.planning.llm_compiler_v3.models.ParallelExecutionResult]

get_next_executable_tasks(count=None)

Get the next tasks to execute, respecting parallel limits.

Parameters:

count (int | None)

Return type:

list[haive.agents.planning.llm_compiler_v3.models.CompilerTask]

get_successful_results()

Get all successful execution results.

Return type:

list[haive.agents.planning.llm_compiler_v3.models.ParallelExecutionResult]

is_execution_complete()

Check if all tasks in the plan have been executed or failed.

Return type:

bool

mark_task_executing(task_id)

Mark a task as currently executing.

Parameters:

task_id (str)

Return type:

None

resolve_task_arguments(task)

Resolve task arguments by substituting dependency references.

Parameters:

task (haive.agents.planning.llm_compiler_v3.models.CompilerTask)

Return type:

dict[str, Any]

should_replan()

Determine if replanning is needed based on execution state.

Return type:

bool

update_ready_tasks()

Update lists of ready and blocked tasks based on current state.

Return type:

None