haive.agents.planning.llm_compiler.agent¶

LLM Compiler Agent - DAG-based parallel task execution.

Composes SimpleAgent (planner with structured DAGPlan output) + parallel tool executor + SimpleAgent (joiner with JoinerDecision output).

Graph: START -> plan -> execute -> join –(replan)–> plan

–(done)—-> END

Uses BaseGraph from haive.core, follows the standard agent pattern.

Classes¶

LLMCompilerAgent

DAG planner + parallel executor + joiner.

Module Contents¶

class haive.agents.planning.llm_compiler.agent.LLMCompilerAgent¶

Bases: haive.agents.base.agent.Agent

DAG planner + parallel executor + joiner.

Composes: - Planner: SimpleAgent with structured output (DAGPlan) - Executor: ThreadPoolExecutor running tools in parallel - Joiner: SimpleAgent with structured output (JoinerDecision)

build_graph()¶

Abstract method to build the agent’s graph.

Return type:

haive.core.graph.state_graph.base_graph2.BaseGraph

compile(**kwargs)¶

Compile the graph and cache the result.

Parameters:

**kwargs – Additional compilation arguments

Returns:

The compiled graph

Return type:

Any

run(input_data, **kwargs)¶

Synchronously run the agent with input data.

Parameters:

input_data (str | dict)

Return type:

Any

run_query(query)¶

Convenience: run and extract answer string.

Parameters:

query (str)

Return type:

str