aGiT

<agent> every agent turn, committed with its story

aGiT wraps Claude Code and OpenCode with Git. You use the agent's own TUI exactly as before — aGiT watches the session and turns every completed turn into a commit carrying the full interaction trace, the model, and the token bill.

f3a9c2e <agent> show, don't tell
agit — claude · session-1 → main
$ agit
┌ claude · session-1 ──────────────────────────────────┐
> add a --version flag to the cli
  · editing agit/cli.py …
  · added --version using importlib.metadata
└──────────────────────────────────────────────────────┘
✓ Created <agent> commit 4b2f31a.            aGiT · Ctrl-G
$ git log --oneline -2
4b2f31a <agent> add a --version flag to the cli
a91c07e Initial commit
$ git show 4b2f31a --stat
<agent> add a --version flag to the cli
 agit/cli.py | 6 ++++++  — trace + model + token cost in the body ↓
9d04e17 why this exists

Agent code without provenance is unreviewable.

A coding agent edits twelve files while you get coffee. A week later nobody can say which prompt produced which change, what the model was told, or what it cost. aGiT makes the unit of agent work a commit — so review, blame, bisect, and revert work on agent output the same way they work on yours.

git show — an aGiT commit message
<agent> add a --version flag to the cli

# Interaction Trace

## User
add a --version flag to the cli

## Agent
Added --version using the package metadata; prints and exits.

# aGiT Metadata
commit_type: agent
backend: claude
model: claude-opus-4-8
session_name: session-1
context_tokens: 18204
tokens_since_last_commit_input: 411
tokens_since_last_commit_output: 2390
71c5b9a how it works

Your branch only ever moves by merge.

Each session runs in its own git worktree on its own branch, so concurrent sessions never stomp each other — or your working tree. Finished turns integrate back into the branch you launched from; conflicts are handed to the agent to resolve, and the resolution is itself a traceable <agent-merge> commit.

Isolated sessions

One worktree per session, per-turn branches, automatic recovery of anything a crash leaves behind. Run several agents side by side.

Backend-native

No model API keys, no proxy of your tokens. aGiT drives the real Claude Code / OpenCode TUI and reads the session's own transcript for the facts.

Costs on the record

Input, output, and cache token counts per commit, straight from the backend's session record — a price tag on every change.

e8d2fa0 install & run

Three commands to the first traced commit.

uv tool install git+https://github.com/core-aix/agit
or: pip install -e . from a clone — Python ≥ 3.10
cd your-repo && agit
launches your default backend's TUI (Claude Code or OpenCode) under aGiT's watch
Ctrl-G
opens the aGiT menu: sessions, backends, staging, user commits, base branch

Prompt the agent as usual. When the turn settles, the commit is already there — git log tells the rest.

HEAD <agent> your move

Put your agents on the record.

Apache-2.0. Issues, ideas, and first contributions welcome — the issue tracker has good first issue tags waiting.