Skip to main content

gitagent

MCP-first agent workspace manager: single worktree, live edit tracking, semantic intents, inbox coordination.

gitagent v0.5.0 is a total rewrite. The CLI is gone — all operations are exposed as MCP tools over stdio. A single global worktree hosts multiple agents simultaneously. Every edit is tracked in SQLite with full attribution. Agents coordinate via an inbox with best-effort conflict notifications.

Install

# from GitHub
pip install "git+https://github.com/david-fm/gawt"

# local development
git clone https://github.com/david-fm/gawt && cd gawt
pip install -e ".[dev]"

Requires Python 3.11+ and a working git on PATH.

Quick start

# Start a session
start_session(feature="auth-rate-limiting")

# Register agents
register_agent(role="implement limiter")   # → {"agent_id": "a_3f2c"}
register_agent(role="write tests")         # → {"agent_id": "a_7b1e"}

# Agents set intent and edit files
start_intent(agent_id="a_3f2c", intent="implement rate limiter")
edit_file(agent_id="a_3f2c", file="src/auth.py", old_string="...", new_string="...")

# Check for conflicts
check_inbox(agent_id="a_3f2c")

# Finalize (orchestrator only)
finalize_session(message="feat(auth): rate limiting")
# → 1 commit on main, worktree removed

Architecture

Host (Claude Code / opencode)
  → spawns: gitagent mcp (stdio)
    → .gitagent/state.db (sqlite)
    → .gitagent/worktree/ (single detached worktree)
  • One worktree active at a time. Features are serialized.
  • Multiple agents share the worktree and coordinate via SQLite inbox.
  • User's checkout on main is never touched.

MCP Tools

Category Tools
Lifecycle start_session, finalize_session, abort_session, get_session
Agents register_agent, unregister_agent, list_agents
Intent start_intent, repurpose, get_current_intent
Editing edit_file, write_file, read_file, delete_file
Inbox check_inbox, send_message, list_edits, list_intents

All tools except lifecycle require agent_id explicitly per call.

How it works

  • Single worktree: detached worktree at .gitagent/worktree/. All agents edit the same files.
  • Live tracking: every edit_file/write_file records (agent_id, file, intent, ts) in SQLite.
  • Atomic writes: all writes go through temp + os.replace (POSIX-atomic). Files are never half-written.
  • Best-effort conflicts: if two agents edit the same file within 30s, both get an inbox notification. No locks, no blocking.
  • Semantic intents: start_intent/repurpose annotate the edit log with why changes are made.
  • Finalize: finalize_session commits the worktree state onto the target branch via detached temp worktree + git update-ref. Single commit, no push.

Layout

<repo>/.gitagent/
├── state.db              # sqlite: sessions, agents, intents, edits, inbox
├── worktree/             # single detached worktree (active session)
├── _finalize_temp/       # temp worktree during finalize (auto-cleaned)
└── log.jsonl             # append-only audit trail

Development

pip install -e ".[dev]"
PYTHONPATH=src pytest tests/ -v

License

MIT © David Florez Mazuera

Release files for gawt 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gawt 0.5.1
File Size Uploaded
gawt-0.5.1.tar.gz 28.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gawt 0.5.1
File Interpreter ABI Platform
gawt-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 48.6 kB

Release files / gawt-0.5.1.tar.gz

Download URL gawt-0.5.1.tar.gz
Size 28.3 kB
Tags Source
SHA-256 checksum
How to use checksums
253bb736cb5c597d1d575b92a40b90961b5fafbcadecc27d3571ba0d1ed6ce9a
BLAKE2b-256 checksum
How to use checksums
5cb1543bcaa82c313e26187f1af85fbd48cbd7cb31448c735188b25df736ea2e
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 Aug 8, 2026.

Transparency log

Release files / gawt-0.5.1-py3-none-any.whl

Download URL gawt-0.5.1-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30ff81473ef21b3d3cd1358674533f7b88bcc1e372a0b23cfa56914270e2f5e8
BLAKE2b-256 checksum
How to use checksums
25c7b942d7a479eeec27ebf79405e21c6b7fde7b0e023d1f4cba25ff09b3ff8a
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 Aug 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page