Git-native, sandbox-isolated, self-evolving agentic coding architecture built around fractal (recursive) intents, competitive planning variants, append-only learning, and entropy-aware decision-making.
Repository: https://github.com/Holon-Agentic-Coder/holon-agentic-coder
A holon is something that is simultaneously a whole and a part. In this project:
- An Intent is a whole task to the agent working on it.
- The same Intent is also a part of a larger parent Intent.
- An Agent is a whole autonomous actor, and also a part of a wider evolving population.
Holon: Agentic Coder is a blueprint (and eventual reference implementation) for autonomous coding agents that can:
- decompose work recursively,
- generate multiple plans for the same intent,
- choose actions via explicit decision physics (success probability + entropy + EV),
- execute in isolated sandboxes,
- record everything in an append-only ledger,
- promote durable learnings into a curated knowledge base,
- and (long-term goal) propose their own intents and evaluate intent quality—earning increasing autonomy over time.
Most agentic coding systems fail in predictable ways:
- State contamination: exploration corrupts the working tree, environments drift, and "it worked once" can't be reproduced.
- Planning amnesia: plans are ephemeral; the system cannot learn which planning strategies work.
- No causal trace: actions are taken without a durable "why/how/what happened" record.
- Human review overload: humans are asked to review noisy micro-changes rather than synthesised parent-level outcomes.
- No comparable variants: there's no fair way to compare plan A vs plan B vs model choice A vs model choice B.
- Hidden routing: switching between models (fast/cheap vs deep/reasoning) is treated as invisible magic instead of a measurable decision.
Holon is designed to make these failure modes structurally difficult by:
- using Git as the universal state machine,
- isolating exploration via one sandbox per sub-intent,
- capturing intent → plan → action → result into an append-only Evolution Ledger,
- treating planning as a versioned hypothesis space,
- and making model routing and exploration risk explicit via entropy-aware metrics.
Before diving deep into this README, we strongly urge all readers to first read the
core_concepts.md document. It contains essential foundational information, terminology, and
principles that are critical for fully understanding the architecture, workflows, and design decisions described here.
Specifically, it introduces:
- Fractal Intents: Recursive task decomposition representing work as a tree of intents (goals) and sub-intents down to atomic actions.
- Competitive Planning: Generating and comparing multiple distinct plan hypotheses (variants) for a single intent.
-
Expected Value (
$EV$ ): The core decision metric used to rank plans, balancing success probability ($P(success)$), value, cost, and risk. -
The Entropy Framework: Measuring local plan complexity and risk (
$\Delta S_{intent}$ ) and global system disorder ($S_{system}$ ) to enforce safety limits. - The Intent Lifecycle State Machine: Tracking intents from proposed to executing, completed, failed, merged, or discarded states.
Please take the time to review core_concepts.md carefully to get the most out of this project.
Any intent may spawn sub-intents through one of its plans, and a sub-intent's own plans may spawn sub-sub-intents, until
leaf nodes become atomic intents (direct actions). holon flow caps the nesting at MAX_SUB_INTENT_DEPTH levels
below the root intent. In practice a split is decided by a plan: the planner writes a ## Sub-intent list in its plan
and the flow runs each item as a sub-intent nested under that plan. The model leaves other stages open: a split may also
be decided at the intent, execution or review stage, and the sub-intent then nests under the branch node whose stage
decided it.
For the same intent, multiple planning variants exist simultaneously (v1, v2, v3...). They are competing hypotheses, not edits.
Low-probability and risky exploration is permitted because branches and sandboxes can be discarded. The system learns from outcomes without polluting the mainline.
Git provides immutable history, causal lineage, reproducibility, and cheap branching as isolation.
- Sub-intents merge only into the branch of the node that decided the split (in practice the plan branch)
- Never directly to
main - Below the root the agent raises and merges every sub-intent PR automatically; only the root intent's PR to
mainis presented to a human for review and promotion (seedocs/git_flow.mdStage 3)
Sub-intents must rebase from the latest remote deciding node branch (in practice the plan branch):
- before execution (to avoid stale work)
- after execution (to resolve conflicts at the smallest semantic scope)
Holon starts with weak-but-stable definitions of:
- P(success) (success prediction)
- ΔS (entropy / divergence / blast radius)
- EV (expected value)
These must be comparable and explainable before any "learning" can be meaningful.
Agents may route tasks to different models (e.g., Gemini Flash vs DeepThink). Routing choice must be:
- recorded,
- evaluated,
- and improved via selection pressure (Routing ROI).
Each project is effectively its own unique world with distinct rules, constraints, and dynamics. Foundational models provide powerful priors but cannot fully capture the infinite variety of possible project worlds.
True progress arises from autonomous exploration and evolution within these unique rules. Agents use foundational models as starting hypotheses but actively experiment, learn from failures, and evolve domain-specific strategies tailored to the project’s context.
This recursive, fractal-like learning process is the core of Holon’s value proposition, shifting the focus from scaling models alone to building self-improving agentic systems that adapt within their own environments.
Agents should eventually propose their own intents and spawn sub-intents recursively—but autonomy is earned through demonstrated intent quality and calibration.
Holon operates as a Stateless Engine using two durable stores:
holon-config/(Static Priors): the human-authored "Constitutional Brain" (prompts, world context, safety rules, metric weights).holon-knowledge/(Dynamic Experience): the machine-authored "Evolving Memory" (append-only ledger, curated knowledge base, universal wisdom base).
flowchart TB
H[Human / Root Goals] --> I[Intent Node<br>#40;fractal recursion#41;]
I --> PV[Planning Variant Pool<br>v1, v2, v3...]
PV --> PE[Plan Evaluation<br>pre + post metrics]
PE --> D[Decision Engine<br>P#40;success#41;, ΔS, EV]
D --> MR[Model Router<br>fast vs deep tiers]
MR --> SI[Sub-Intent Expansion]
SI --> RB1[Rebase Gate 1<br>#40;pre-execution#41;]
RB1 --> SX[Sandbox Execution<br>#40;1 sandbox per sub-intent#41;]
SX --> RB2[Rebase Gate 2<br>#40;post-execution#41;]
RB2 --> MP[Automatic merge ONLY to<br>deciding node branch]
MP --> L[Evolution Ledger<br>append-only]
MP --> KB[Knowledge Base<br>curated + versioned]
L --> SEL[Selection Pressure<br>#40;plan fitness, routing ROI#41;]
KB --> SEL
SEL --> PV
MP --> HR[Human Review<br>Root intent only]
HR --> MAIN[Merge to main]
Holon enforces a strict Git discipline to ensure isolation, reproducibility, and clean human review boundaries.
Key rules:
- Sub-intents branch from their deciding node's branch, in practice the plan branch (never from
main) - Sub-intents merge only into their deciding node's branch, automatically (never directly to
main) - Sub-intents must rebase from the deciding node's branch before and after execution
- Only root intents are reviewed by humans: the root intent's PR to
mainis the only human stop
holon flow targets each sub-intent at its plan branch and merges it there automatically after consensus and
calibration (see docs/git_flow.md Stage 3).
For complete details, see docs/git_flow.md.
Holon treats identity as explicit and hierarchical. Identity is the primary key for the Evolution Ledger.
An intent is generated by a specific model. Multiple models may generate competing intent proposals concurrently:
I-{timestamp}-{slug}- Example:
I-1771890389-refactor-metrics
A plan is a versioned variant tied to an intent and the model tier used to produce it:
P-{timestamp}-{ticker}-{model code}- Example:
P-1771890396-CLA-CO4.6
The ticker is the runner's three-letter code (claude-agent is CLA, antigravity-agent is ANA, pi-agent is
PIA) and the model code is derived from the model name (claude-opus-4-6 gives CO4.6); the plan's row in
plans.jsonl keeps the full agent and model. A plan ID is unique under its intent, so a plan is always looked up by its
intent and plan ID together, and its file lives at plans/{intent}/{plan id}.md. Older names
(P-{timestamp}-{agent}-{model}, with or without an 8-character hex) stay valid and are never renamed (see
Git Flow section 2.5.2).
Note: This example shows a "Deep" model planning for an intent that was originally proposed by a "Flash" model.
Holon uses a filesystem-like branch structure to represent the intent hierarchy. A sub-intent's branch nests under the
branch node whose stage decided the split -- by default the plan whose ## Sub-intent list named it -- so the path
records which of an intent's competing plans spawned it. The sub-intent is cut from the deciding node's branch and
merges back into it automatically (target_branch equals deciding_branch). A split decided during review may nest
under the reviewed plan or the reviewed execution; either is acceptable. Its provenance records the parent intent, the
deciding node (deciding_branch, plus parent_plan_id when a plan, an execution of that plan or a review decided the
split, and parent_execution_id additionally for an execution-decided split or a review-decided split nested under the
execution); the list item it came from is identified by its own recorded goal and description. Siblings under one
deciding node always have different slugs, so their ids cannot collide (see Git Flow sections 1.5
and 2.2).
I-{timestamp}-{slug}/_
Example: I-1771890389-refactor-metrics/_
I-{timestamp}-{slug}/I-{timestamp}-{slug}/_ # decided at the intent stage
I-{timestamp}-{slug}/P-{timestamp}-{ticker}-{model code}/I-{timestamp}-{slug}/_ # decided by a plan (default)
I-{timestamp}-{slug}/P-{timestamp}-{ticker}-{model code}/E-{timestamp}-{ticker}-{model code}/I-{timestamp}-{slug}/_ # decided during execution
Example: I-1771890389-refactor-metrics/P-1771890390-CLA-CS4.6/I-1771890392-improve-estimators/_
Work derived from a specific plan variant occurs on a plan branch nested under the intent, and each execution of that plan on an execution branch nested under the plan:
I-{timestamp}-{slug}/P-{timestamp}-{ticker}-{model code}/_
I-{timestamp}-{slug}/P-{timestamp}-{ticker}-{model code}/E-{timestamp}-{ticker}-{model code}/_
Example Plan Branch: I-1771890389-refactor-metrics/P-1771890396-CLA-CO4.6/_
Example Execution Branch: I-1771890389-refactor-metrics/P-1771890396-CLA-CO4.6/E-1771890398-CLA-CS4.6/_
Holon uses simple, stable metrics early, then evolves better estimators later.
Probability that executing a plan advances the intent without violating constraints:
Tracked:
- Pre-execution (predicted): estimated before the plan runs
- Post-execution (actual): measured after completion (1.0 if success, 0.0 if failure)
Expected divergence / blast radius / irreversibility introduced by the plan:
Entropy is a cost signal, not "badness". Higher entropy means:
- More files/systems touched
- More irreversible changes
- Higher conflict likelihood
- Greater novelty/uncertainty
Tracked:
- Pre-execution (predicted): estimated based on plan analysis
- Post-execution (actual): measured from git diff, test coverage changes, dependency graph changes
Combines impact, success likelihood, learning value, entropy, and cost:
Where:
- Impact: estimated value delivered if the intent succeeds
- LearningValue: estimated epistemic gain delivered to the system, independent of success
- μ (mu): learning value weight (tunable, typically 0.1–1.0)
- λ (lambda): entropy penalty weight (tunable, typically 0.1–1.0)
- Cost: resource consumption (tokens, time, compute)
Used for:
- Selecting between competing plans
- Deciding whether to continue planning (convergence)
- Evaluating agent/model performance over time
The system tracks prediction accuracy by comparing pre-execution estimates to post-execution measurements:
- P(success) calibration: Are agents overconfident? Underconfident?
- ΔS calibration: Are entropy estimates accurate?
- Impact calibration: Did the intent deliver expected value?
Poor calibration reduces an agent's trust level and influences future routing decisions.
For complete formulas and bootstrap definitions, see docs/metrics.md.
Planning is not allowed to loop forever. For any given intent, the system may generate multiple planning variants (v1, v2, v3...), but must eventually converge and select a plan to execute.
Different planning approaches may yield different tradeoffs:
- v1: conservative, low entropy, incremental
- v2: aggressive, higher entropy, faster impact
- v3: novel approach, untested but potentially superior
Variants are competing hypotheses, not iterative edits.
Planning stops when any of the following conditions is met:
No meaningful improvement in Expected Value after N consecutive variants:
if EV(v_n) - EV(v_n-1) < threshold for N iterations:
stop planning
Default: threshold = 0.05, N = 3
Cumulative planning cost (tokens, time, or entropy) exceeds the allocated budget:
if sum(planning_cost(v1...vn)) > planning_budget:
stop planning
Planning itself consumes resources and must be bounded.
A plan achieves sufficiently high P(success) at acceptable ΔS:
if P(success) > 0.85 and ΔS < acceptable_threshold:
stop planning (high confidence)
Continuing to plan costs more than the expected gain:
if cost_of_next_variant > expected_EV_improvement:
stop planning (diminishing returns)
Once planning stops, the system selects the plan with the highest EV:
selected_plan = argmax(EV(v1), EV(v2), ..., EV(vn))
All variants and their scores are recorded in the Evolution Ledger for future learning.
Different models may generate plans for the same intent concurrently:
- Gemini Flash generates v1 (fast, cheap)
- Claude Sonnet generates v2 (deeper reasoning)
- Gemini DeepThink generates v3 (complex decomposition)
This enables model routing selection pressure: which model produces better plans for which types of intents?
For detailed convergence policy implementation, see docs/architecture.md and
docs/metrics.md.
Holon treats model selection as a first-class decision with measurable outcomes. Different LLMs (and tiers of the same LLM) may be used for different stages, including:
- intent proposal (including competing intent proposals from multiple models)
- plan generation (multiple planning variants per intent, potentially multi-model)
- execution assistance (coding, refactoring, test fixing)
- evaluation and write-up (summaries, ledger/K.B. promotion candidates)
Routing is a tradeoff across:
- capability (reasoning depth, code quality)
- latency (time to first token / completion)
- cost (tokens, $)
- risk/entropy (blast radius and irreversibility)
- novelty (unfamiliar repo areas / dependencies)
Holon makes routing explicit so routing itself can be improved over time.
A routing decision should be explainable and based on observable signals, such as:
- intent complexity: tree depth, dependency count, ambiguity
- predicted entropy (ΔS): estimated blast radius of the plan
- success sensitivity: how costly failure is (production risk, irreversibility)
- novelty: how unfamiliar the code region is to the system/K.B.
- budget constraints: time, tokens, compute limits
- agent trust level: permitted entropy budget and recursion depth
Every routed action records metadata into the Evolution Ledger, including:
model_id(e.g.,gemini_flash,gemini_deepthink,claude_sonnet)agent_family(e.g.,gemini,claude)routing_reason(short explanation + key signals)stage(intent, planning, execution, evaluation)token_usage,latency_ms,inference_cost_est- predicted vs actual outcomes (P(success), ΔS, EV impact)
This makes routing decisions auditable and comparable.
Holon supports multiple models operating concurrently on the same parent intent, for example:
- competing intent proposals from different models
- parallel plan variants generated by different models
- execution assistance escalated from a fast model to a deep model when stuck
Concurrency is controlled via:
- budgets (token/time/entropy)
- convergence rules (stop when EV plateaus or dominant plan emerges)
- strict Git isolation (no direct merges to
main)
Holon improves routing by measuring which routes produce better outcomes under constraints.
Key evolving metrics include:
- Routing ROI: outcome quality per unit cost/latency
- Calibration: how accurate each model is at predicting P(success) and ΔS
- Failure modes: where specific models systematically underperform
- Stage-fit: which models do best at intent generation vs planning vs execution
Over time, the system learns:
- which model tiers are best for which intent types,
- when escalation is justified,
- and when cheap/fast planning is sufficient.
For detailed routing policy and scoring, see docs/architecture.md and
docs/metrics.md.
Holon aims for agents that can propose their own intents and (eventually) spawn recursive sub-intent trees without human initiation.
This is the most powerful—and most dangerous—capability in the system. It must be earned, not granted by default.
In a fully autonomous system, agents should be able to:
- observe the codebase, ledger, and K.B.
- identify improvement opportunities (refactoring, tech debt, optimisation, new features)
- propose intents with justification and predicted metrics
- decompose those intents into sub-intents recursively
- execute and learn from outcomes
This closes the loop: agents evolve the system and evolve themselves.
Unconstrained autonomous intent generation can lead to:
- runaway recursion: agents spawn infinite sub-intents
- misaligned goals: agents optimise for the wrong objectives
- resource exhaustion: entropy budgets blown on low-value work
- sandbox escape attempts: agents propose intents to modify validation rules
- chaotic exploration: high-entropy changes with no learning value
Agents progress through capability tiers based on demonstrated performance:
| Level | Name | Capabilities | Unlock Criteria |
|---|---|---|---|
| 0 | Observer | Read ledger, read K.B. | Default |
| 1 | Proposer | Propose atomic intents (no sub-intents) | 10 successful executions |
| 2 | Decomposer | Propose intents with 1 level of sub-intents | Intent Quality > 0.7 for 20 proposals |
| 3 | Architect | Propose intents with 2 levels of sub-intents | Intent Quality > 0.8 for 50 proposals |
| 4 | Autonomous | Unlimited depth (target model) | Intent Quality > 0.85 for 100 proposals |
| 5 | Meta | Can propose changes to validation rules | Intent Quality > 0.9 for 200 proposals + human approval |
Trust levels are per-agent and can be demoted if quality degrades. The tiers are the target model: holon flow
currently lets any agent's plan list sub-intents and enforces one hard nesting cap, MAX_SUB_INTENT_DEPTH (currently 2
levels below the root intent), for every agent.
When an agent proposes an intent, it must include:
{
"proposal_id": "PROP-1738901234-x7y9",
"proposed_by": "agent-gemini-deepthink-001",
"agent_trust_level": 3,
"intent_proposal": {
"goal": "Implement caching layer for ledger reads",
"justification": "Ledger reads are 60% of query time; caching can reduce by 80%",
"predicted_impact": 0.85,
"predicted_p_success": 0.75,
"predicted_entropy": 25,
"predicted_ev": 0.51,
"decomposition": {
"type": "recursive",
"depth": 2,
"sub_intents": [
{
"goal": "Design cache invalidation strategy",
"predicted_entropy": 8,
"sub_intents": []
},
{
"goal": "Implement Redis cache adapter",
"predicted_entropy": 12,
"sub_intents": []
}
]
}
}
}Every proposal goes through validation checks:
Agent's trust level determines max allowed sub-intent depth (target model; holon flow currently enforces one hard cap,
MAX_SUB_INTENT_DEPTH, for every agent):
if proposed_depth > TRUST_LEVEL_MAX_DEPTH[agent.trust_level]:
reject("Agent level {level} limited to depth {max_depth}")Total tree entropy must fit within agent's budget:
total_entropy = calculate_tree_entropy(proposal.decomposition)
if total_entropy > agent.max_entropy_budget:
reject("Total tree entropy {total} exceeds budget {budget}")Sub-intents must be aligned with parent goal and system objectives.
Proposal must not duplicate recent intents or violate known anti-patterns from K.B.
Any proposal targeting the validation system itself requires Level 5 + human approval.
After an intent completes, it receives an Intent Quality Score based on:
- Impact accuracy: Did it deliver predicted value?
- P(success) calibration: Was the success prediction accurate?
- Entropy calibration: Was the entropy estimate accurate?
- Alignment: Did it advance parent/system goals?
- Efficiency: Resource usage vs outcome quality
Agents with consistently high Intent Quality Scores earn higher trust levels and larger budgets.
Certain validation rules cannot be modified by agent proposals:
- max recursion depth per trust level
- entropy budget caps
- human approval requirement for Level 5
- proposal rate limits
All proposals, validations, and outcomes are logged in the Evolution Ledger.
Agents whose quality degrades are demoted to lower trust levels, reducing their autonomy.
Autonomous intent generation is introduced gradually:
Phase 1: Human-only intent creation (bootstrap)
Phase 2: Agents propose atomic intents (Level 1)
Phase 3: Agents propose single-level decomposition (Level 2)
Phase 4: Agents propose multi-level trees (Level 3-4)
Phase 5: Exceptional agents propose meta-changes (Level 5, human-gated)
For complete trust ladder, validation rules, and scoring formulas, see docs/safety.md and
docs/architecture.md.
This repository is intended to evolve from concept + spec into a reference implementation.
Current focus (recommended build order):
- Core ID + naming + Git invariants
- Append-only ledger schema + writer
- Planning variant representation + scoring stubs
- Convergence policy
- Sandbox executor harness
- Model routing + routing ROI capture
- Autonomy proposals + trust ladder enforcement
The documents in this repository are structured hierarchically, building from basic concepts and architecture down to specific operational subsystems:
flowchart TD
CC["core_concepts.md (Foundational Principles & Terms)"]
APP["appendix.md (Glossary of Metrics & Terms)"]
ARCH["architecture.md (Technical Design Blueprint)"]
CC --> ARCH
CC -.-> APP
subgraph OperationalPillars [Operational Pillars]
GF["git_flow.md (Git-Native Isolation Rules)"]
PE["planning_and_evaluation.md (Variant Evaluation)"]
MET["metrics.md (Mathematical Estimators & Formulas)"]
SF["safety.md (Trust Levels & Budgets)"]
end
subgraph KnowledgeAndLedger [Knowledge & Ledgers]
KB["knowledgebase_schema.md (Curation Workflow)"]
WB["wisdombase_schema.md (Meta-Evolution)"]
LD["ledger_schema.md (Audit Logs & Records)"]
end
subgraph AgentImplementation [Agent Implementation]
AD["agent_design.md (Agent Contracts)"]
AGS["agents.md (Execution CLI Adapters)"]
end
ARCH --> OperationalPillars
ARCH --> KnowledgeAndLedger
ARCH --> AgentImplementation
PE <--> MET
AD --> AGS
EX["examples.md (Practical Scenarios & Workflows)"]
OperationalPillars --> EX
AgentImplementation --> EX
-
Foundations & Core Blueprint:
-
docs/core_concepts.md— Conceptual definitions and principles. -
docs/architecture.md— Full technical architecture design. -
docs/appendix.md— Glossary of mathematical symbols and terms.
-
-
Operational Rules & Evaluation:
-
docs/git_flow.md— Git-native branch, rebase, and merge invariants. -
docs/planning_and_evaluation.md— Planning lifecycle, variants, and convergence policies. -
docs/metrics.md— Detailed formulation of estimators ($P(success)$ ,$\Delta S$ ,$EV$ , and calibration). -
docs/safety.md— Resource limits, budgets, sandboxing, and trust ladders. -
docs/environment_variables.md— EveryHOLON_*environment variable: purpose, values, defaults, where it is read and whether it reaches the containers.
-
-
Knowledge & Ledgers:
-
docs/knowledgebase_schema.md— Propose/validate/promote schemas. -
docs/wisdombase_schema.md— Universal code invariants and meta-principles. -
docs/ledger_schema.md— JSON schemas for the evolution ledger.
-
-
Execution & Integrations:
-
docs/agent_design.md— High-level agent architecture and behavioural contracts. -
docs/agents.md— Instructions for integrating specific agents (Gemini, Claude, etc.). -
docs/examples.md— End-to-end practical walkthroughs.
-
All containerized Holon roles (intent, plan, execute) are driven by the holon CLI. It maps agent names to
images, forwards credentials (GITHUB_TOKEN, HOLON_AGENT_*), bind-mounts the flow's host worktree at the sandbox
workspace path (the host, not the container, fetches and pushes), and optionally attaches the token-reduction proxy.
The CLI can be executed via multiple standard pathways:
From the root of the repository, the convenience script ./holon sets up PYTHONPATH and invokes the CLI
entrypoint directly:
./holon intent intents/my-task.json # Intent Creator
./holon plan "I-1784983150-build-execution/_" --agent pi-agent --model gemini-3.8-flash
./holon execute "I-1784983150-build-execution/P-1784988130-PIA-G3.8F/_" \
--agent pi-agent --model gemini-3.8-flash --token-reduceRun the CLI on-demand in an isolated ephemeral environment without installing it into the system:
[!WARNING] Always specify
--fromwhen invoking viauvx. Do not execute bareuvx holon. The package nameholonis registered on public PyPI by an unrelated third-party project; omitting--fromintroduces a dependency confusion and namespace collision risk whereuvxwill attempt to download and run the third-party PyPI package. Additionally, local path invocations (uvx --from ./apps/sandbox-executor) must be run from the repository root.
# Run from local repository clone (must be run from repository root)
uvx --from ./apps/sandbox-executor holon intent intents/my-task.json
uvx --from ./apps/sandbox-executor holon plan "I-1784983150-build-execution/_" --agent pi-agent --model gemini-3.8-flash
uvx --from ./apps/sandbox-executor holon execute "I-1784983150-build-execution/P-1784988130-PIA-G3.8F/_" --agent pi-agent --model gemini-3.8-flash
# Run directly from remote Git repository (can pin @main, release @<tag>, or immutable @<commit-sha>)
uvx --from "git+https://github.com/Holon-Agentic-Coder/holon-agentic-coder.git@main#subdirectory=apps/sandbox-executor" holon --helpInstall the holon executable globally onto your $PATH using uv tool:
# Install from local clone (run from repository root)
uv tool install ./apps/sandbox-executor
# Or install directly from remote Git repository (can pin @main, release @<tag>, or immutable @<commit-sha>)
uv tool install "git+https://github.com/Holon-Agentic-Coder/holon-agentic-coder.git@main#subdirectory=apps/sandbox-executor"Once installed, invoke holon directly anywhere:
holon intent intents/my-task.json
holon plan "I-1784983150-build-execution/_" --agent pi-agent --model gemini-3.8-flash
holon execute "I-1784983150-build-execution/P-1784988130-PIA-G3.8F/_" --agent pi-agent --model gemini-3.8-flashTo upgrade a globally installed version:
uv tool upgrade holonWhen developing locally within the repository, synchronise the virtual environment using uv sync to install holon in
editable mode:
uv sync
uv run holon --help
# Or install editably in an existing virtual environment:
uv pip install -e ./apps/sandbox-executorTask execution is standardised via uv and taskipy in pyproject.toml. Python testing, linting, formatting, and
maintenance tasks are executed directly with uv run task <target> or uv sync. Makefile is reserved strictly for
Docker image orchestration and system prerequisite provisioning:
# Via uv and taskipy (Python project tasks):
uv sync # Synchronise virtual environment dependencies
uv run task check # Run all static linting, formatting, and lockfile checks
uv run task lint # Run lockfile verification and Ruff checks
uv run task lint-docs # Check Markdown documentation formatting with Prettier
uv run task format # Automatically format codebase (Ruff) and documentation (Prettier)
uv run task test # Run unit tests (excluding container integration tests)
uv run task clean # Remove transient build and test caches
# Via Make (Docker & system prerequisites only):
make help # Display all available Docker/system targets and descriptions
make build-images # Build all sandbox Docker images
make check-prerequisites # Verify installed tools (fatal: uv, gh, openssl which must be OpenSSL not LibreSSL; advisory: GNU Make, npx, gh auth, Docker CLI/Buildx/daemon)
make check-docker # Check Docker installation, Buildx, and daemon running status
make install-docker # Install Docker for the detected operating system
make install-homebrew # Install Homebrew (macOS only)The holon flow command orchestrates the complete 5-stage lifecycle, taking an intent specification from inception to
post-execution calibration while strictly enforcing human-in-the-loop safety boundaries and append-only ledger
auditability.
flowchart TD
S1["Stage 1: Intent Creation (I-{timestamp}-{slug}/_)"] --> S2["Stage 2: Plan Generation (P-{timestamp}-{ticker}-{model code}/_)"]
S2 --> S3["Stage 3: Plan Execution (E-{timestamp}-{ticker}-{model code}/_)"]
S3 --> S4["Stage 4: PR Review Loop (Sandboxed Reviewer Ensemble, CI, Mergeability)"]
S4 --> H1{"Every Reviewer Approved, Mergeable, CI Green?"}
H1 -- "Yes" --> C2{"Skip Calibrate?"}
H1 -- "No" --> F1["FAILED (Review Rejection)"]
C2 -- "--skip-calibrate" --> S_SKIP["Stage 5: SKIPPED"]
C2 -- "default" --> S5["Stage 5: Post-Execution Calibration (/calibrated branch)"]
S5 --> APPROVED["APPROVED (Ready for Maintainer Merge)"]
S_SKIP --> APPROVED
APPROVED --> DONE["Human Maintainer Merges PR"]
Stage 4 cannot be skipped by any option: a Stage 4 that fails halts the flow with the failure reported, before calibration or any later step runs.
| Option | Type | Default | Description |
|---|---|---|---|
intent_file |
Positional | None |
Path to intent JSON file (e.g., intents/my-task.json). |
--from-stage |
Choice | None |
Resume from stage: intent, plan, execute, review, calibrate. |
--checkpoint |
Path | None |
Path to pipeline checkpoint .json file for state resumption. |
--agent |
String | Resolved | Agent runner: HOLON_AGENT, then the detected harness agent, then antigravity-agent; a --checkpoint resume keeps the checkpoint's runner. |
--model |
String | Resolved | LLM model: HOLON_MODEL, then the runner's default (gemini-3.8-flash-medium for antigravity); a --checkpoint resume keeps the checkpoint's model unless --agent switches the runner. |
--skip-preflight |
Flag | False |
Skip the readiness probe run before Stage 1 (also HOLON_SKIP_PREFLIGHT=1; see holon doctor). |
--dry-run |
Flag | False |
Dry run mode without executing agent containers or committing. |
--json |
Flag | False |
Output pipeline status and stage results in structured JSON format. |
--target-worktree |
Path | . |
Repository and base branch to run against. If it has the intent's target branch checked out (normally main), the run happens in a dedicated flow-<slug> sibling worktree branched off origin/<target_branch>; the given worktree is never modified. |
--skip-push |
Flag | False |
Skip pushing git branches to remote origin. Only valid with --dry-run: any non-dry run, including a resume from any stage, is rejected before any stage runs. |
--skip-calibrate |
Flag | False |
Skip Stage 5 (post-execution calibration report generation). |
--max-review-iterations |
Integer | 25 |
Maximum autonomous review loop iterations in Stage 4 (must be >= 1, default: 25). The loop runs at most one iteration: it stops after the first, approved or not (no automatic resolver). |
--ensemble-size |
Integer | 3 |
Number of independent reviewer agent turns per iteration; approval needs every reviewer to approve with zero findings (default: 3). Must be >= 1. Reviewer turns run only inside a sandbox: on a host, Stage 4 fails closed and the review is run with holon review-loop. |
--token-reduce |
Flag | False |
Route through the holon-coherence proxy sidecar for token compression and prompt caching. |
--mitm-web |
Flag | False |
Launch mitmweb web UI on port 8081 (configurable via HOLON_MITM_WEB_PORT) for live traffic inspection. |
# Standard 5-stage lifecycle execution:
./holon flow intents/my-task.json
# Skip calibration:
./holon flow intents/my-task.json --skip-calibrate
# Dry-run validation with structured JSON output:
./holon flow intents/my-task.json --dry-run --json
# Resume an interrupted execution from a checkpoint:
./holon flow --checkpoint .holon/flow/checkpoint-my-task.json --from-stage execute
# Execute with automated token reduction and web inspector:
./holon flow intents/my-task.json --token-reduce --mitm-webFor in-depth architecture details, state diagrams, and lifecycle hooks, see .agents/holon_flow.md and apps/sandbox-executor/README.md.
[!NOTE]
--token-reduceis available onflow,plan, andexecute(not onintent) and is currently experimental / not yet functional (Phase 2 addon is missing, so runs degrade to direct egress). See Running Plan Generation and Running Execution for the full contract.
--token-reduce starts a locally-owned holon-coherence proxy sidecar and moves the sandbox onto a per-run Docker
network so agent responses can be compacted before they are tokenized.
[!WARNING]
--token-reduceis experimental. The sidecar runs the holon-coherence proxy image and the mitmproxy addon that image ships:holon-coherence:latestwhen built locally withholon-coherence build, otherwiseghcr.io/holon-agentic-coder/holon-coherence:latest, pulled on first use (HOLON_COHERENCE_IMAGEpins another image). If the image cannot start or its proxy never answers, the CLI logs an actionable error and the run continues with direct egress: no interception takes place.
[!WARNING]
--token-reduceperforms local TLS interception against that locally-owned proxy. A Holon Root CA is generated at~/.holon/certs/holon-root-ca.crtwithbasicConstraints=critical,CA:TRUEandkeyUsage=critical,keyCertSign,cRLSign(a CA withoutkeyUsageis refused as a trust anchor by several TLS stacks) and is rotated automatically before it would expire within 30 days.Trust mechanism (merged bundle, not
update-ca-certificates): the sandbox image runs as the unprivilegedholonuser, so the Debian trust store can never be refreshed. Instead the sandbox entrypoint concatenates the image's system store (/etc/ssl/certs/ca-certificates.crt) with the Holon CA into/home/holon/.holon-ca-bundle.crt, andSSL_CERT_FILE/REQUESTS_CA_BUNDLE/CURL_CA_BUNDLEpoint at that merged file — those variables replace the trust store of the clients that read them, so pointing them at the single-cert Holon mount would break every legitimate HTTPS endpoint (github.com, api.openai.com, the agent's own LLM endpoint).NODE_EXTRA_CA_CERTSpoints at the Holon CA alone because it augments Node's built-in roots. Loopback and link-local endpoints are excluded viaNO_PROXY/no_proxy.Key exposure: a MITM proxy inherently requires the CA private key to sign forged leaves, so
~/.holon/proxy-ca/mitmproxy-ca.pem(key + cert, mode0600) andmitmproxy-ca-cert.pemare mounted read-only into the proxy sidecar only (/home/mitmproxy/.mitmproxy). The private key is never mounted into the agent container, which only ever receives the public certificate.Retention / redaction posture: the proxy cache (
~/.holon/proxy-cache) is mounted read-only into the sidecar and sidecar logs are size-bounded (--log-opt max-size=5m --log-opt max-file=2), but no credential redaction is implemented yet (Phase 2).--token-reducemust therefore only be used against a locally-owned proxy.
- Prerequisites:
dockerandopensslon the hostPATH. On any failure (missing binary, missing addon script, failed sidecar, proxy that never becomes ready) the CLI logs an actionable error and the run continues with direct egress; a dead proxy is never injected. - Containment: the sidecar is capped at
--memory=256m --cpus=0.5with bounded log rotation, and both it and its per-run network (holon-net-<pid>-<uuid>) are removed when the run finishes — on every exit path, including early failures while assembling thedocker runcommand.
| Variable | Effect |
|---|---|
HOLON_TOKEN_REDUCE |
Opt-in without the flag (1, true, yes, on). Attaches to an already-running proxy; never starts one. |
HOLON_PROXY_URL |
Proxy URL used in the HOLON_TOKEN_REDUCE path. Defaults to the host gateway (host.docker.internal:8080 on macOS/Windows, 172.17.0.1:8080 on Linux). |
[!IMPORTANT] Host
HTTP_PROXY/HTTPS_PROXYare never interpreted as opt-in; sandbox networking only changes when--token-reduceorHOLON_TOKEN_REDUCEis set explicitly.
Every other HOLON_* variable (runner, budgets, proxy, git, ledger, review loop, logging and CI) is listed in
docs/environment_variables.md.
This project is currently in the ideation and planning phase. The focus is on refining the conceptual architecture, principles, and specifications—not implementation.
Contributions are welcome in the form of:
- Conceptual feedback: challenging assumptions, identifying edge cases, proposing alternative approaches
- Documentation improvements: clarity, completeness, consistency across specs
- Theoretical refinement: better metrics definitions, convergence policies, safety mechanisms
- Use case analysis: how this architecture would handle specific real-world scenarios
Please open issues or discussions for:
- questions about design decisions
- proposed changes to core principles
- identification of gaps or contradictions in the spec
Note: This repository is a blueprint and specification, not a reference implementation. There are no plans to accept implementation PRs at this time.
Holon is open-source software licensed under the Apache License, Version 2.0.
Copyright 2026 Holon Agentic Coder Contributors.
Holon: Agentic Coder is a git-native architecture for autonomous coding agents that models work as a recursive tree of intents, evaluates multiple planning variants per intent, executes sub-intents in isolated sandboxes with mandatory rebasing, records all intent/action/outcome data in an append-only evolution ledger, curates learnings into a versioned knowledge base, and treats success prediction, entropy, and model routing as first-class measurable signals driving selection pressure and earned autonomy.
Next: See docs/architecture.md for the complete technical design.