fractal
Fractal is an open-source framework for building hierarchical AI coding agents. It enables a top-level agent to decompose a complex task into smaller subtasks and delegate each to a child agent running in an isolated git worktree. This isolation ensures that code changes for each subtask are contained in separate branches, facilitating parallel development and conflict-free merging. The system provides configurable constraints to control resource usage: depth limits restrict how many levels of delegation are allowed, cost limits cap the monetary expenses (such as API calls to LLMs), and time limits bound the total execution duration. These safeguards prevent runaway agent processes and allow safe integration into continuous development workflows. Fractal is designed for software engineering tasks, such as implementing features across multiple files, refactoring large codebases, or fixing bugs that span several modules. By distributing subtasks to specialized child agents, each focused on a delimited scope, the overall solution can be built more efficiently and with better local coherence. The git worktree mechanism naturally aligns with version control best practices, enabling easy review of each agent’s contribution.
- Category
- AI Agents
- Pricing
- Open Source
Problem solved
Fractal addresses the challenge of scaling AI coding agents to large, multi-file tasks by providing a hierarchical decomposition and delegation mechanism that maintains isolation between subtasks and manages resource consumption through configurable depth, cost, and time limits.
Use cases
- Automated feature implementation across multiple files
- Large-scale code refactoring
- Bug fixing with cross-module dependencies
- Parallel code generation and testing
- Automated prototyping of software projects
Audience
- Developers
- ML Engineers
- Researchers
Pros
- Hierarchical decomposition for complex tasks
- Isolated git worktrees prevent interference
- Configurable depth, cost, and time limits
- Open source and customizable
- Facilitates parallel agent work
Cons
- Requires understanding of git worktrees
- Potential overhead of spawning many child agents
- Limited to tasks compatible with git branching model
- May need significant compute resources for many agents
Official website: https://github.com/plasma-ai/fractal
Canonical LambdaBase page: https://www.lambdabase.com/tools/fractal