llm-powered task decomposition with dependency graph generation
The Planner component uses an LLM to automatically decompose complex user queries into subtasks and generates a directed acyclic graph (DAG) representing task dependencies. It parses LLM outputs via StreamingGraphParser to extract task nodes, their input/output relationships, and execution constraints, enabling identification of parallelizable work without manual specification.
Unique: Uses LLM-in-the-loop planning with streaming graph parsing to generate executable task DAGs on-the-fly, rather than requiring users to manually specify task dependencies or using fixed rule-based decomposition. The Planner can generate plans incrementally and stream tasks to the executor before the full plan is complete.
vs alternatives: More flexible than rule-based task decomposition (e.g., ReAct) because it adapts to problem structure via LLM reasoning, and faster than sequential function calling because it identifies parallelizable tasks automatically.
parallel function execution with dependency-aware task scheduling
The TaskFetchingUnit and Executor components implement a scheduler that respects task dependencies from the generated DAG, executing independent tasks concurrently while blocking dependent tasks until their inputs are available. The system maintains a task queue, tracks completion status, and collects results for aggregation, enabling wall-clock latency reduction through parallelism.
Unique: Implements a dependency-aware scheduler that extracts parallelism from task DAGs generated by the Planner, executing tasks concurrently while respecting input dependencies. Unlike sequential function calling (standard ReAct), this enables multiple independent tool calls to run simultaneously with automatic dependency resolution.
vs alternatives: Reduces latency vs sequential function calling by 2-5x on multi-hop tasks with independent branches; more efficient than naive parallel execution because it respects dependencies and doesn't execute tasks prematurely.
react agent integration for iterative reasoning
LLMCompiler can be integrated with ReAct (Reasoning + Acting) patterns where the agent iteratively reasons about the current state, decides on actions (tool calls), observes results, and repeats. This enables adaptive behavior where the agent can adjust its strategy based on intermediate observations.
Unique: Integrates ReAct-style iterative reasoning with LLMCompiler's parallel execution, enabling the agent to combine planned parallelism with reactive decision-making based on intermediate observations.
vs alternatives: More flexible than pure planning because it allows mid-execution strategy changes; more efficient than pure ReAct because it exploits parallelism in independent tasks.
streaming task generation and incremental execution
When enabled, streaming mode allows the TaskFetchingUnit to begin executing tasks as soon as they are generated by the Planner's LLM output stream, without waiting for the complete plan. The StreamingGraphParser incrementally parses LLM tokens into task objects, enabling pipelined planning and execution that reduces time-to-first-result and overall latency.
Unique: Implements streaming graph parsing that converts LLM token streams into executable task objects on-the-fly, enabling the executor to begin work before the Planner finishes generating the full plan. This pipelined approach reduces end-to-end latency by overlapping planning and execution phases.
vs alternatives: Faster than batch planning (wait for full plan before execution) because it starts execution immediately; more responsive than traditional ReAct which waits for full LLM output before parsing.
multi-provider llm integration with unified interface
LLMCompiler abstracts LLM provider differences through a unified model interface (src/utils/model_utils.py) that supports OpenAI, Azure OpenAI, Friendli, and vLLM backends. The framework handles provider-specific API calls, token counting, and response parsing, allowing users to swap providers without changing orchestration logic.
Unique: Provides a unified interface abstracting OpenAI, Azure OpenAI, Friendli, and vLLM with provider-agnostic method signatures, allowing the Planner and Executor to remain provider-agnostic while supporting both closed-source and open-source models.
vs alternatives: More flexible than frameworks tied to a single provider (e.g., LangChain's OpenAI-centric design); enables cost optimization by switching providers without code changes.
replanning with execution context incorporation
LLMCompiler can generate new execution plans based on results from previous attempts, incorporating execution history and intermediate results as context to the Planner. This enables the system to adapt when initial plans fail or produce unsatisfactory results, using feedback to refine task decomposition.
Unique: Enables the Planner to generate new execution plans conditioned on previous execution results and failures, treating replanning as a first-class capability rather than an error recovery afterthought. This allows the system to learn from execution and adapt decomposition strategies.
vs alternatives: More adaptive than single-shot planning because it incorporates execution feedback; more efficient than naive retry because it generates new plans rather than re-executing the same failed plan.
tool registry and schema-based function calling
LLMCompiler maintains a registry of available tools with structured schemas defining inputs, outputs, and descriptions. The Planner uses these schemas to generate valid function calls, and the Executor uses them to invoke tools with proper argument binding. This schema-driven approach ensures type safety and enables the LLM to reason about tool capabilities.
Unique: Implements a schema-driven tool registry where tools are defined with structured input/output schemas that the Planner uses to generate valid function calls. This enables type-safe, schema-validated function calling without manual argument binding.
vs alternatives: More structured than string-based tool descriptions (e.g., ReAct with natural language tool specs); enables validation and type checking that reduces runtime errors.
result aggregation and answer synthesis
The LLMCompilerAgent component collects results from all executed tasks and synthesizes them into a final answer using the LLM. It maintains a mapping of task IDs to results, passes this context to the LLM, and generates a coherent response that incorporates all intermediate findings.
Unique: Uses the LLM itself to synthesize results from parallel task execution, treating synthesis as an LLM-powered reasoning step rather than simple concatenation. This enables intelligent interpretation and integration of diverse task outputs.
vs alternatives: More intelligent than template-based result aggregation because it uses LLM reasoning to synthesize and interpret results; more flexible than fixed aggregation logic.
+3 more capabilities