Overview
Fractal is an agent framework from Plasma AI that enables recursive sub-agent spawning for complex multi-step work. Agents can decompose tasks, spawn sub-agents, execute them in parallel, and aggregate results. Includes depth control, verification, and error handling.
Features
- ✓Recursive sub-agent spawning
- ✓Automatic task decomposition
- ✓Parallel execution support
- ✓Result aggregation strategies
- ✓Depth control for recursion limits
- ✓Result verification
- ✓Error handling with fallbacks
Installation
pip install fractalPros
- +Clean abstraction for recursive agent patterns
- +Built-in task decomposition
- +Parallel execution support
- +Depth control prevents infinite recursion
- +Error handling and fallback support
Cons
- −Newer project with limited adoption
- −Smaller community and ecosystem
- −May be overkill for simple tasks
Alternatives
Documentation
Fractal — Recursive Agent Loops for Complex, Multi-Step Work
Overview
Fractal is an open-source framework from Plasma AI for recursive agent loops designed for complex, multi-step work. Released in July 2026, it enables agents to break down complex tasks into sub-tasks, recursively delegate to sub-agents, and aggregate results.
The recursive agent pattern has proven effective in systems like DeerFlow, Hermes Agent, and OpenInterpreter. Fractal provides a clean abstraction for this pattern: an agent that can spawn sub-agents, wait for results, and combine them into a coherent output.
Available at github.com/plasma-ai/fractal.
Features
- Recursive Sub-Agent Spawning: Agents can create sub-agents to handle sub-tasks
- Result Aggregation: Framework automatically combines sub-agent outputs
- Task Decomposition: Automatic or manual breakdown of complex tasks
- Depth Control: Limit how deep recursion can go
- Parallel Execution: Run sub-agents concurrently when possible
- Result Verification: Built-in verification for sub-agent outputs
- Error Handling: Graceful failure handling with fallback strategies
Installation
npm install @plasma-ai/fractal
# or
pip install fractal
Quick Start
from fractal import FractalAgent
agent = FractalAgent()
# Agent automatically decomposes the task
result = agent.run(
task="Build a complete web application with frontend, backend, and database",
max_depth=3,
parallel=True
)
print(result)
Core Concepts
Task Decomposition
Fractal starts by decomposing a complex task into manageable sub-tasks. This can be:
- Automatic: The framework uses LLM reasoning to break down the task
- Manual: You provide the decomposition explicitly
Recursive Execution
Each sub-task can itself be decomposed and executed by sub-agents, creating a recursive execution tree. The max_depth parameter controls how deep recursion can go.
Result Aggregation
When sub-agents complete, Fractal combines their outputs using configurable aggregation strategies — merging, voting, or custom combination logic.
Examples
Multi-Step Research Task
result = agent.run(
task="Research the best AI agent frameworks and compare them",
max_depth=2,
aggregation="merge"
)
Code Generation with Verification
result = agent.run(
task="Build a REST API with authentication, CRUD operations, and testing",
max_depth=3,
verify=True,
parallel=True
)
Document Generation
result = agent.run(
task="Write a comprehensive technical report on AI agent security",
max_depth=2,
sections=[
"Introduction",
"Threat Landscape",
"Mitigation Strategies",
"Case Studies",
"Recommendations"
]
)
Pros
- ✅ Clean abstraction for recursive agent patterns
- ✅ Built-in task decomposition
- ✅ Parallel execution support
- ✅ Result aggregation strategies
- ✅ Depth control prevents infinite recursion
- ✅ Error handling and fallback support
Cons
- ✅ Newer project with limited adoption
- ✅ Smaller community and ecosystem
- ✅ Documentation still evolving
- ✅ May be overkill for simple tasks
When to Use
- Complex multi-step workflows: Tasks that naturally decompose into sub-tasks
- Research and analysis projects: Where results from multiple angles need combining
- Large code generation tasks: When building complete applications
- Document generation: Where sections can be written in parallel
