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.0

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.0
File Size Uploaded
gawt-0.5.0.tar.gz 27.4 kB Details

Built distribution (wheel)

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

Total release size: 47.4 kB

Release files / gawt-0.5.0.tar.gz

Download URL gawt-0.5.0.tar.gz
Size 27.4 kB
Tags Source
SHA-256 checksum
How to use checksums
79c336a26ebd3ab993f39c2e280d69705dc6013f939bbd839743fea792029c4e
BLAKE2b-256 checksum
How to use checksums
51ceb35f93879ceae5f49fd8b9872e03faff225c1e7af886bb60a1b23b7e08ba
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 7, 2026.

Transparency log

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

Download URL gawt-0.5.0-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25b0ea95fcbeb0ac120ec9957f0889a7a57399de045cb3204721def186a5887a
BLAKE2b-256 checksum
How to use checksums
311e713dc6c7a03b496ea31985c5037e33e12b0215776d7a0158af5c72eb89c8
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 7, 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

0.5.1

2 release files

This release

0.5.0 This release

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