Argon — Git for MongoDB

Branch, time-travel, merge and undo your MongoDB. Any driver, real mongod,
versioned history underneath. Built for AI agents.
Three ideas, thirty seconds:
- A branch is a pointer, not a copy — created with a metadata write. Checkout separately materializes the data.
checkout turns a branch into a real MongoDB database — pymongo,
mongoose, mongosh, indexes, aggregation, transactions: all real, and
supported document writes become history while capture is healthy.
- Review and recover changes — diff, merge, undo and pin states within
the configured retention and capture guarantees.
Install
brew install argon-lab/tap/argonctl
npm install -g argonctl
docker run -d --name argon-mongo -p 127.0.0.1:27017:27017 mongo:7 --replSet rs0
docker exec argon-mongo mongosh --quiet --eval 'rs.initiate({_id:"rs0",members:[{_id:0,host:"localhost:27017"}]})'
argon doctor
Use a current supported MongoDB patch release in production. Source builds use
Go 1.26.6 or newer, as declared in go.mod.
The flow
main ──branch──▶ experiment ──checkout──▶ mongodb://… ← any driver
│
┌── argon diff ──────────┤ document history
▼ ▼
merge (a data PR) or undo / discard / rewind
argon import database --uri mongodb://localhost:27017 --database myapp --project myapp
argon branches create experiment -p myapp
argon checkout -p myapp -b experiment
argon watch -p myapp -b experiment --actor agent:experiment
argon diff -p myapp -b experiment
argon merge preview -p myapp -b experiment
argon merge apply <plan-id>
argon restore reset -p myapp -b main --time 2026-07-07T09:00:00Z --backup pre-incident
Prefer clicking? argon console serves a local web console (UI + REST API),
supervises capture, reaps expired sandboxes every minute, and opens your browser.
For a complete managed workflow, run the two-agent pinned dataset example.
What you get
| Command | In one line |
|---|
| Branching | argon branches create | a metadata write — instant, zero copy |
| Real databases | argon checkout / argon proxy | any driver, real mongod; proxy serves stable mongodb://host/<project>~<branch> URIs |
| Write capture | argon watch | exact change-stream images → history, one actor label per branch |
| Time travel | argon time-travel query | any historical state, by LSN or timestamp |
| Undo | argon undo --actor <a> | revert a range or actor label; append-only, conflict-aware |
| Restore | argon restore preview/reset/branch | rewind a released branch or fork retained history |
| Data PRs | argon merge preview/apply | three-way merges as reviewable plans; conflicts never silent |
| Sandboxes | argon sandbox create --ttl 1h | fork + checkout + TTL in one step — disposable agent workspaces |
| Dataset pins | argon pin create / pin sandbox | immutable named states that survive GC and resets — reproducible evals |
| Web console | argon console | local UI + REST API in one command |
Data history covers document inserts, updates, replacements and deletes. Collection
drop/rename produces degraded capture; indexes and collection options are not
versioned. Native writes are asynchronous; control operations drain capture.
Stop writers before release. Pins preserve states, while GC can expire audit
and undo history. See operations for recovery and credentials.
Storage retention uses snapshots + retention-window GC keep state plus a
window of history, not every write forever. Details and the consistency
model, stated honestly: ARCHITECTURE.md.
For AI agents
claude mcp add argon -- argon mcp
pip install argon-agents
saver = ArgonCheckpointSaver.from_sandbox(argon, "myapp")
saver.merge()
argon.create_pin("myapp", "eval-v1")
run = argon.sandbox_from_pin("myapp", "eval-v1")
The full agent workflow: docs/AGENTS.md.
Documentation
| |
|---|
| Quick start | install → first merge, step by step |
| CLI reference | every command |
| Agents | sandboxes, pins, MCP, REST API, argon-agents, proxy |
| Architecture | how it works and what it guarantees |
| Operations | deployment, chunk stores (S3/FS), GC, v1→v2 migration |
| Performance | every number lives in the reproducible benchmarks — none here, by policy |
Issues ·
Discussions ·
Contributing ·
argonlabs.tech
Give your MongoDB a time machine. Branch without fear. ⭐