fractal
Hierarchical agent loops with recursive self-organization.
In a fractal, autonomous agent loops arrange themselves into a tree: a node
iterates toward a goal in its own git worktree and spawns child nodes for
separable subtasks, so the tree grows to fit the problem rather than a fixed
plan. Hard caps (iterations, depth, children, cost, time) keep each loop
bounded, and an operator can steer or stop it at any point. Run metadata
(including cost) lands in one local SQLite database, which can be interacted
with live in a terminal UI.
Source: https://github.com/plasma-ai/fractal
Package: https://pypi.org/project/plasma-fractal/
Documentation: https://docs.plasma.ai/fractal
Installation
Install the fractal package from PyPI:
pip install plasma-fractal
or
pip install fractal
Use pipx install or uv tool install to install the package in an isolated
environment. If you use one of these two methods, you must also install
plasma-wiki (a plain pip install pulls plasma-wiki and puts wiki on your
PATH, but this is not the case when using pipx install or
uv tool install).
uv tool install plasma-fractal --with-executables-from plasma-wiki does the
same in one command.
Open the dashboard from your project root with fractal open (requires an
initialized fractal). Pass --light if your terminal uses a light color scheme.
Skill
Install the skill for your agent via the plugin marketplace (Claude Code and Codex):
# Claude Code
/plugin marketplace add plasma-ai/plugins
/plugin install fractal@plasma
# Codex
codex plugin marketplace add plasma-ai/plugins
codex plugin add fractal@plasma
Another install route is from the CLI, which copies (or symlinks) the fractal
and wiki skills into ~/.claude/skills and ~/.agents/skills (add --project
for the current project only):
fractal install [--link]
After upgrading the package, re-run fractal install to refresh the copied
skills (pass --link for symlinked install).
Usage
A fractal is a tree of git worktrees, each running an autonomous agent loop. The
root (user) node is your current branch itself — it has no worktree or loop of
its own; top-level nodes branch from it, and child nodes branch from their
parent. Agents iterate in tmux sessions (or, with --headless, in detached
process groups), and all state (runs, iters, steps, costs, signals) is tracked
in a local SQLite database.
Five agent backends are supported — Claude Code (claude), Codex (codex),
Grok Build (grok), OpenCode (opencode), and Oh My Pi (omp) — selected per
node with --agent (children inherit it). Claude and Codex can additionally
route through OpenRouter with --provider=openrouter, which authenticates via
OPENROUTER_API_KEY from the launching shell; OpenCode and Oh My Pi reach
OpenRouter natively through their own openrouter/<author>/<model> model ids.
Use the /fractal skill to spawn and manage agent nodes. The fractal CLI is
also available directly — run fractal --help and fractal <command> --help to
explore.
The skill is invoked as /fractal [directive] and takes plain-language
instructions. The agent interprets the directive and prints any suggested
NODE.md instructions and completion requirement it can distill from the
directive, plus a table of every parameter (empty where the directive said
nothing), then asks for anything it could not infer. From there it walks you
through refining the node's definition and, once you approve, launches the node
in a tmux session. On hosts where tmux cannot run, add --headless; the node's
output appends to headless.log, delegated child starts follow the parent's
backend, and an unflagged relaunch reuses the backend the node last launched
with.
Parameters the skill interprets from the directive:
name: node name (required; letters, digits, and_only — no-)path: project root, repo root or monorepo sub-project (default:.)title: human-readable display name (default: de-slugged node name)scope: restrict commits to subdirectories within the worktree (comma-separated, e.g.parent/child,tests)base: branch to start from (default: current branch)meta: target node branch for meta-configurationinherit: seed surfaces from the parent node instead of the package seed (comma-separated:steps,scripts,skills,config, orall); agent config always inherits. A top-level spawn's parent is the user node, which carries no steps, scripts, or skills — the parameter is for configured nodes spawning childrenagent: agent command; inherits the user node's default when omittedprovider: provider route for the agent (e.g.openrouter); inherits the user node's default when omittedmodel: model override; when omitted, the agent uses its own default model (Claude runs on the seed'sbestalias, oranthropic/claude-sonnet-4.6when routed through OpenRouter)effort: reasoning-effort override; when omitted, the Claude and Codex seeds' own pinned level (high) applies rather than the vendor default, while Grok, OpenCode, and Oh My Pi fall back to the vendor defaultmax-iters: per-run iteration capmax-depth: maximum child node nesting depthmax-children: maximum direct child nodesmax-descendants: maximum total descendant nodestimeout: per-run time limit (e.g.30m,1.5h)iter-timeout: per-iteration time limit (e.g.30m,1.5h)step-timeout: per-step time limit (e.g.30s,10m); caps each stepinterval: fixed iteration schedule (e.g.1h)sleep: delay between iterations (e.g.10s)wait: sleep between approval-wait sync invocations (default:1m)max-cost: cost ceiling in USD per run — runs are isolated, so each launch arms the cap anew; after a budget-ended run,node start --continuerefuses without an explicit--max-costmax-iter-cost: per-iteration cost ceiling in USDmax-step-cost: per-step cost ceiling in USD (warn-only when unenforceable)reserve-budget: budget reserved for cleanup; USD or N% ofmax-cost(default: 10%)sync: enable (default) or disable radio sync before each stepdetached: run each step as a separate agent session (default: one continuous session)local: skip pushing to remote after each commit
Development
Install
Run install.sh in the package root. With no environment active it creates and
uses a local .venv; with one active (e.g. pyenv) it installs into that
environment (editable), without recreating it:
./install.sh --all-extras --groups=test,lint,type
Run ./install.sh --help for all options. Alternatively, run
uv sync --all-extras --group test --group lint --group type and
uv run pre-commit install to set up the environment manually.
Installing a dependency as editable (e.g. a sibling package) is left to the
caller: uv pip install --editable <path>.
With an editable install, fractal install --link symlinks the bundled skill
into the agent skill directories instead of copying it, so skill edits apply
without re-running the install.
Once installed, run tools with uv run --no-sync <command>, or activate the
environment first (source .venv/bin/activate).
Tests
Run the test suite:
pytest .
The suite runs with --doctest-modules enabled, and the integration tests
create real git repositories and worktrees.
Linting
Run linters and formatters:
pre-commit run --all-files
Contributing
The contribution workflow, repository conventions, and release process (version sources, tagging, CI guard) are documented in:
- Contribution workflow (organization-wide): CONTRIBUTING.md
- Repository conventions: AGENTS.md
- Release process (organization-wide): RELEASING.md
Pull requests should be branched from dev, not main, and opened against
dev — main only advances at releases.
License
Licensed under the Apache License 2.0 — see LICENSE.
Copyright © 2026 Plasma AI
Metadata
Release files for plasma-fractal 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| plasma_fractal-1.3.0.tar.gz | 537.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plasma_fractal-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / plasma_fractal-1.3.0.tar.gz
| Download URL | plasma_fractal-1.3.0.tar.gz |
|---|---|
| Size | 537.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7701c58b6232cf50c04cba26ab24a1e7a95986ad5328caa9cc1522d809263b5b
|
|
BLAKE2b-256 checksum How to use checksums |
8d1773ce0716aa2b111249a2df5f67e78e0ea258f12cc09b73e8a257a3ba1898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / plasma_fractal-1.3.0-py3-none-any.whl
| Download URL | plasma_fractal-1.3.0-py3-none-any.whl |
|---|---|
| Size | 573.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33da2882a49e88b9039cc951c79893d4a6db8cf35c687d85889c89723e4361fa
|
|
BLAKE2b-256 checksum How to use checksums |
cf20cfd1b53e16ede0a0c8cb66f3d4e4c6f8eb91d36563ad11c449d4ecc94c78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logSecurity for plasma-fractal 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for plasma_fractal-1.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.