h5i – Git Ciente de IA com Auditoria
h5i-dev/h5i
Git que registra quem, por quê, e o que o agente sabia
Ver no GitHubMCP server que estende Git para rastrear contexto completo de agentes de IA: quem executou, por quê, o que o modelo sabia, se foi seguro. Inclui sandbox auditável para código gerado, redução de tokens (95%), briefs de PR 3.5x mais ricos e loops multi-agente 1.8x mais rápidos. Armazena conversas entre agentes e evidência bruta em Git LFS.
Instalação
npx convez-ai h5i-dev/h5i1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Rastrear decisões e contexto de agentes de IA em commits
- Executar código gerado por IA em sandbox antes de aplicar
- Reduzir tokens mantendo evidência bruta das saídas
- Comunicação em tempo real entre múltiplos agentes via Git
Veredito

Ferramenta sólida para equipes que usam agentes IA em produção. Resolve problemas reais (auditoria, contexto perdido, token waste) com abordagem pragmática via Git. Implementação técnica madura (Rust, testes, LFS), mas requer workflow disciplinado e conhecimento de Git para aproveitar.
README
A tradução para o português deste README ainda está na fila.
Git records what changed. h5i records the rest: who, why, what the agent knew, whether it was safe, and how the next agent picks up where the last left off.
Use h5i if you want your AI agents to stop leaving their work in thin air.
- Want to know which model, prompt, and reasoning led to a commit?
- Want the next agent to inherit the full context of the last one?
- Want Claude and Codex to talk in real time, with the conversation stored in Git?
- Want to reduce token usage by shrinking noisy tool output while keeping the raw evidence?
- Want to run a risky AI-generated code in a confined sandbox, then review it before it touches your tree?
- Want to catch leaked secrets, blind edits, and risky AI changes before review?
Recent News
- New in v0.1.8: Auditable Sandbox. Run risky AI-generated code in a confined environment, keep an audit trail of what happened, and apply the result only after review. Jump to Agent Sandbox ↓
- New in v0.1.7: Token Reduction with Unified Form. Agents see a compact summary while the full output stays out of context, shared via Git LFS. Jump to Token Reduction ↓
- Agent Radio reached 100+ points on Hacker News. Read the discussion here.
- New in v0.1.5: Agent Radio. Since your agents' context already lives in Git, they can now talk to each other through it.
h5i msgadds a cross-agent message channel stored inrefs/h5i/msg. Jump to Agent Radio ↓
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
Initialize h5i in an existing Git repo:
h5i init
For Claude Code or Codex hooks:
h5i hook setup --write --wrap-bash # writes .claude/settings.json and .codex/config.toml
Post the PR review brief:
h5i share pr post # upsert sticky PR comment
h5i share pr post requires the GitHub CLI (gh) to be installed and authenticated
(gh auth status clean). Use h5i share pr body when CI should render markdown
without posting through gh.
Sync h5i sidecar refs with teammates:
h5i share push
h5i share pull
3. Feature Examples
3.1. Agent Radio — agents that talk over Git
Because that context already lives in Git, your agents can also talk to each other through it: h5i msg is a Git-backed cross-agent message channel stored in refs/h5i/msg, built for typed operational handoffs (ASK · REVIEW_REQUEST · RISK · DONE · ACK). Claude can ask, Codex can review, risks can be flagged and resolved, and the whole log survives clones, machines, and branches. It travels with h5i share push / pull, and divergent sends from two machines union-merge with no messages lost.
To efficiently use h5i msg, first register some hookups for agents:
h5i msg setup
Then, we’re ready to let Claude and Codex communicate with each other in real time. Open two separate terminals, launch Claude Code and Codex, and give instructions to them.
Example Instructions
- Claude:
Can you play Chess with Codex via h5i - Codex:
Can you play Chess with Claude via h5i
We can also monitor the conversation in real time with h5i msg watch.
For more details, see this blog post: Claude Code and Codex Can Have Real-Time Conversation via Git
3.2. Agent Sandbox — a confined, fully auditable environment
h5i env gives you a disposable, confined environment — a git worktree plus a policy that limits what the code inside can read, write, and reach over the network — so you can run a refactor, a dependency upgrade, or an untrusted build (yourself or via an agent) without it touching your main tree. Your loop is four commands:
h5i env create env-name --profile agent-claude # make a confined box (picks the strongest isolation the host supports)
# h5i env create env-name --profile agent-codex
h5i env shell env-name # work inside it — or hand the box to an agent
h5i env propose env-name # mediated commit + review brief
h5i env apply fix-auth # merge it into your branch (only when you choose to)
Inside the box, every command is confined: reading /etc/shadow, opening a raw socket, reaching a host that isn't on the allowlist, or calling mount / unshare / ptrace is blocked by Landlock + seccomp + namespaces, while normal work runs and is recorded. (h5i env run <name> -- <cmd> runs a single confined command the same way.)
Everything is auditable after the fact. h5i env log lists every command run, secret used, and access blocked; h5i env inspect --capture <id> shows one run's record — its output, exit code, the exact policy that was enforced, and any redacted secrets; h5i env compare lines up parallel attempts; and the Sandbox tab of the web dashboard shows every allowed and blocked action. h5i env propose writes the change up for review first — nothing reaches your branch until you apply. The whole record lives in refs/h5i/env and moves between clones with h5i share push / pull.
h5i env create picks the strongest isolation level the host can actually enforce (h5i env probe shows what that is). If you ask for a level the host can't provide, h5i refuses rather than quietly running with less:
| Tier | Confinement |
|---|---|
workspace | git worktree only — trusted code |
process | Landlock + seccomp deny-list + user/net namespaces + cgroup v2 (rootless) |
supervised | process tier + a live seccomp-notify socket gate (default-deny sockets) plus a real L3/L4 net.egress allowlist — slirp4netns uplink + nftables default-drop + /etc/hosts DNS pinning |
container | rootless Podman + a DNS-pinned net.egress domain allowlist (L7) |
3.3. Token Reduction with Unified Form
Wrap any command with h5i capture run -- <cmd> and the agent sees only a compact, normalized summary of errors, failures, and counts, while the full raw output is stored out of band in refs/h5i/objects. Every tool's output collapses into one unified form, so a 4 MB test log no longer burns your context window, and the raw bytes are always one h5i recall object <id> away when you need them.
# One Schema for Every Tool
tool: pytest
kind: test # test | lint | typecheck | build | vcs | generic
status: failed # passed | ok | failed | error | unknown
exit_code: 1
counts: { failed: 1, passed: 120 }
parser_confidence: parsed # parsed | heuristic | generic
raw_oid: sha256:934f… # the full output, always recoverable
findings:
- kind: test_failure # test_failure | diagnostic | build_error | panic | generic
severity: failure
id: tests/test_auth.py::test_refresh
message: assert 0 == 100
location: tests/test_auth.py:42
fingerprint: 0bb827e4e61a # stable across line shifts → dedupe / track
To share captures across a team, h5i borrows the split that Git LFS uses: the manifest in refs/h5i/objects is a lightweight pointer (it carries the raw output's sha256), while the bytes themselves ride on a native Git LFS backend, so huge tool output never bloats the Git object database. For remotes that are not HTTP, it transparently falls back to a git ref store.
3.4. Context DAG
The context DAG shows how the work unfolded: the goal, every milestone, and the OBSERVE / THINK / ACT trace behind each change, captured automatically as the agent works. Because it is snapshotted on every commit, you can replay exactly what an agent knew and why it acted at any point in history.
h5i recall context show
3.5. Pull Request Integration
When a branch is ready for review, h5i surfaces all of it where reviewers already work — on the pull request.
The AI Pull Request Brief:
h5i share pr post
🔎 Review focus
The exact files to open first, ranked by where the agent spent its compute.
🎯 Goal & Intent
The goal agents were tasked to solve.
📌 Reviewer checklist
Actionable verification steps tailored for this specific diff.
🧠 Reasoning
The OBSERVE / THINK / ACT steps.
🛡️ Security & Duplicated Code
Automated check for credential leaks, blind edits, and copy-pasted blocks.
🤖 AI Provenance
Track the prompt, model names, and commit lineage.
3.6. Web Dashboard
h5i serve # http://localhost:7150
4. The foundation: a versioned record of every agent's work and communications
h5i is a pure Git sidecar for recording and sharing AI-agent contexts, metadata, and other useful information. It uses dedicated refs, so it doesn’t pollute your working tree or your normal branch graph.
| Ref | What lives there |
|---|---|
.git/refs/h5i/notes | Per-commit metadata: model, agent, prompt, tests, decisions, risk signals. |
.git/refs/h5i/context | The reasoning workspace as a DAG: goal, milestones, traces, branches. |
.git/refs/h5i/msg | Cross-agent message log (append-only, union-merged on pull). |
.git/refs/h5i/objects | Token-reduction capture manifests: command, exit code, and filtered summary of large outputs (full raw kept locally). |
.git/refs/h5i/env | Sandbox environments: events, manifests, and digest-pinned policies for isolated, confined agent runs. |
.git/refs/h5i/checkpoints/<agent> | Per-agent memory snapshots. |
Because these are Git objects, they are content-addressed, deduplicated, pushable, fetchable, and survive git gc.
5. Documentation
- Official Website - project overview
- Tutorials - guided workflows
- Blog - design notes, audits, and case studies
6. Contributing
High-impact contributions:
- try h5i on a real AI-assisted repo and file issues with confusing moments
- improve PR-body presentation and GitHub reviewer workflows
- add adapters for more test runners and agent tools
- harden prompt-injection and compliance rules
- improve dashboard workflows for reviewers
If the idea matters to you, starring the repo is the fastest way to help more AI-heavy teams find it.
7. 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.
8. License
Apache-2.0. See LICENSE.