Skip to content

h5i-dev/h5i

Repository files navigation

h5i logo

tests Apache-2.0 GitHub stars release
Agent Ensembles Sandboxed Worktree 95% less token waste

Auditable Workspaces for AI Coding Agents

h5i (pronounced high-five) gives every AI coding agent a sandboxed Git worktree, and records the prompts, commands, logs, policies, and reviews behind every change. Run one agent safely, scale to many via a conflict-free multi-agent orchestra, then merge one auditable result. It all lives in your repo, carried by Git, with no SaaS.

  • Prompt versioning and quality assessment
  • Persistent context/memory
  • Supervised sandboxed environment
  • Token reduction up to 95%
  • Programmable and conflict-free multi-agent orchestration
  • Fully-automated audit of AI-generated code

h5i-dev%2Fh5i | Trendshift

Who it's for: platform, security, and DevEx leads rolling out Claude Code and Codex who want to run teams of agents and keep review and audit defensible as agents write more of the diff.

Isolated per agent
no file, branch, or port clashes
Auto peer-review
cross-agent discussion
Rich dashboard
diffs, reviews, results
Lives in your Git
refs/h5i/* · no SaaS

1. Install

curl -fsSL https://raw.githubusercontent.com/h5i-dev/h5i/main/install.sh | sh

Or build from source:

cargo install --git https://github.com/h5i-dev/h5i h5i-core

2. 60-Second Flow

2.1. Setup

Initialize h5i and wire the Claude Code / Codex hooks:

h5i init
h5i hook setup --write --wrap-bash --team
git add .
git commit -m "update hooks"

2.2. Track Prompts and Contexts

Once the hooks are registered, h5i versions your human prompts and every agent context step (reads, writes, thinking) as Git objects, trimming noisy tool output along the way (for pytest, just the failures) to cut up to 95% of the tokens while keeping the raw output recoverable.

  • h5i recall log: replay the captured prompts - example output
  • h5i recall context show: replay the agent context steps - example output
  • h5i audit review: suggested Review Points - example output
  • h5i audit maturity: measure the quality of prompts - example output
  • h5i share push / h5i share pull: share the prompts, contexts. and all logs with other team members
  • h5i share pr post: post an AI-usage summary (prompt quality, AI/human commit ratio, secret leaks, prompt injection, and more) to the pull request (needs the gh CLI)

2.3. Sandboxed Environment

h5i gives each agent a secure, sandboxed worktree. Let it run with permissions off inside the box, then review its diff before anything lands on your branch:

h5i env create claude-env --profile agent-claude
h5i env shell claude-env
box$ claude --dangerously-skip-permissions
box$ exit

h5i env diff claude-env      # review what the agent changed in the box
h5i env propose claude-env   # turn the box's work into a reviewable proposal
h5i env apply claude-env     # merge the reviewed changes onto your branch

2.4. Web UI

Monitor the status:

h5i serve

The h5i serve workbench in motion: an attention rail shows what needs you, the sandbox blocks a forbidden egress, a Why drawer opens with evidence badged by authority (enforced, verified, observed), a neutral verdict lands on the Board, and the Decide tab ranks candidates by merge confidence, prompt maturity, and risk.

2.5. Programmable Multi-Agent Orchestration

You can further program flexible multi-agent workflows using ordinary control flow such as parallel execution, loops, and conditionals in Rust or Python SDK. For example, you can have Claude and Codex independently implement the same task, review and improve each other’s work, and then select the better result.

pip install h5i-orchestra
from h5i.orchestra import Conductor

async def main():
    task = "implement quicksort in python with unit test"

    async with Conductor(".", "fix-auth") as c:
        claude = await c.hire("claude-agent", runtime="claude")
        codex  = await c.hire("codex-agent",  runtime="codex")

        # Have both agents implement the task independently and in parallel
        claude_work, codex_work = await asyncio.gather(claude.work(task), codex.work(task))

        await c.freeze() # Seal the round, ensuring that neither agent influenced the other beforehand

        # Have each agent review the other's work
        await asyncio.gather(codex.review(claude_work), claude.review(codex_work))

        # Verify each submission in a fresh, neutral sandbox
        await c.verify(claude_work, ["pytest", "--quiet"])
        await c.verify(codex_work, ["pytest", "--quiet"])

        verdict = await c.judge() # Select the smallest diff among the submissions that pass all tests
        print("winner:", verdict.selected_submission)

asyncio.run(main())

4. Documentation

  • Official Website: project overview, Slides
  • Tutorials: guided workflows · Blog: design notes, audits, case studies
  • MANUAL.md / man h5i: full command reference
  • CONTRIBUTING.md: we welcome contributions of any kind.
  • h5i man > ~/.local/share/man/man1/h5i.1: install the man page (generated from the CLI), then read it with man h5i.

5. Gallary

Example output of h5i recall log
commit 9c76075822d743125587574e63bc1756866df496
Author:    Koukyosyumei <koukyosyumei@hotmail.com>
Agent:     claude-code (claude-fable-5)
Prompt:    "I guess you can remove the arXiv column, and just use hyperlink in Paper column to arviv website"
Message:   README: fold arXiv column into hyperlinked paper names
Example output of h5i recall context show
── Context (depth=2) ────────────────────────────────────
  Goal: add herdr support to h5i-python: launcher='herdr' (seats in herdr panes) + herdr  (branch: herdr-launcher)
  Milestones: (showing 20 most recent of 88; --limit 0 for all)
    ✔ [x] edited env.rs; edited env.rs; edited team.rs
    ✔ [x] Surveyed papers for h5i-python reference implementations
  Recent Trace:
    [00:00:37] ACT: edited blog/reimplementing-40-multi-agent-papers.md
    [00:01:04] NOTE: PLACEHOLDER (~/Dev/h5i-python/examples/README.md): iting 40 of these: the only paper mechanics that needed any workaround were self-review (forbidden by the engine, solved with a same-model second seat…
    [01:02:16] OBSERVE: read README.md
Example output of h5i audit review
  #1 3e744a3f  score 1.00  ██████████
     Floze · 2026-07-19 14:20 UTC
     docs: benchmark env isolation overhead (#355)
       ⬦ LARGE_DIFF          182 lines changed (>50)
       ⬦ UNTESTED_CHANGE     182 lines changed with no test metrics recorded
       ⬦ CODE_EXECUTION      Dangerous execution pattern 'subprocess.run()' added (line 13). Verify this is intentional and use --force to override.
Example output of h5i audit maturity
🧠 Prompt maturity: 42.7/100  🪴 developing
   coverage: 4/6 AI commits scored (67% coverage) · low confidence
   common flags: too short, weak context, no acceptance criteria
   Objective (core)   █████░░░░░ 0.54
   Grounding (core)   ██████░░░░ 0.60
   Direction (core)   ██████░░░░ 0.64
   Context            ██████░░░░ 0.60
   Examples           ░░░░░░░░░░ 0.00
   Structure          ██░░░░░░░░ 0.21
   Diversity          ████████░░ 0.84
   Clarity            █████████░ 0.94
   Adequacy           █████████░ 0.87
   Evidence (bonus)   ████████░░ 0.80 (+bonus)

6. Acknowledgements

h5i's token-reduction filters build on prior art, both Apache-2.0:

  • rtk: the declarative output-filter rule files and the engine that runs them are derived from rtk.
  • headroom: the log line-folding technique (collapse near-identical lines into one with a count) is reimplemented from headroom.

See NOTICE and assets/filters/NOTICE for full attribution.

7. License

Apache-2.0. See LICENSE.

About

Auditable workspaces for AI coding agents: sandboxed worktrees, programmable multi-agent orchestration, automated security checks, up to 95% less token waste, and persistent memory.

Topics

Resources

License

Contributing

Security policy

Stars

476 stars

Watchers

2 watching

Forks

Contributors