{
  "markdown": "# Argon — Git for MongoDB\n\n<p align=\"center\">\n  <a href=\"https://www.argonlabs.tech\">\n    <img src=\".github/assets/hero.png\" alt=\"Argon — Git for MongoDB, built for AI agents: branch off prod, run an agent, undo the session\" width=\"100%\">\n  </a>\n</p>\n\n[![Build Status](https://github.com/argon-lab/argon/actions/workflows/ci.yml/badge.svg)](https://github.com/argon-lab/argon/actions/workflows/ci.yml)\n[![Go Report](https://goreportcard.com/badge/github.com/argon-lab/argon)](https://goreportcard.com/report/github.com/argon-lab/argon)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Homebrew](https://img.shields.io/badge/Homebrew-argonctl-orange?logo=homebrew)](https://github.com/argon-lab/homebrew-tap)\n[![npm](https://img.shields.io/npm/v/argonctl?logo=npm&label=npm)](https://www.npmjs.com/package/argonctl)\n[![PyPI](https://img.shields.io/pypi/v/argon-agents?logo=pypi&label=argon--agents)](https://pypi.org/project/argon-agents/)\n\n**Branch, time-travel, merge and undo your MongoDB. Any driver, real mongod,\nversioned history underneath. Built for AI agents.**\n\nThree ideas, thirty seconds:\n\n1. **A branch is a pointer, not a copy** — created with a metadata write. Checkout separately materializes the data.\n2. **`checkout` turns a branch into a real MongoDB database** — pymongo,\n   mongoose, mongosh, indexes, aggregation, transactions: all real, and\n   supported document writes become history while capture is healthy.\n3. **Review and recover changes** — diff, merge, undo and pin states within\n   the configured retention and capture guarantees.\n\n## Install\n\n```bash\nbrew install argon-lab/tap/argonctl      # macOS\nnpm install -g argonctl                  # cross-platform\n\n# MongoDB must run as a replica set (one-node is fine):\ndocker run -d --name argon-mongo -p 127.0.0.1:27017:27017 mongo:7 --replSet rs0\ndocker exec argon-mongo mongosh --quiet --eval 'rs.initiate({_id:\"rs0\",members:[{_id:0,host:\"localhost:27017\"}]})'\nargon doctor\n```\n\nUse a current supported MongoDB patch release in production. Source builds use\nGo 1.26.6 or newer, as declared in `go.mod`.\n\n## The flow\n\n```\nmain ──branch──▶ experiment ──checkout──▶ mongodb://…  ← any driver\n                                              │\n                     ┌── argon diff ──────────┤  document history\n                     ▼                        ▼\n        merge (a data PR)          or   undo / discard / rewind\n```\n\n```bash\n# 0 · Bring your data in (\"git clone\") — or: argon projects create myapp\nargon import database --uri mongodb://localhost:27017 --database myapp --project myapp\n\n# 1 · Branch — instant, no copy\nargon branches create experiment -p myapp\n\n# 2 · In terminal A, capture writes with a branch actor label\nargon checkout -p myapp -b experiment      # prints a connection string\nargon watch    -p myapp -b experiment --actor agent:experiment\n\n# In terminal B, write through the printed URI. Then:\n\n# 3 · Review and merge back — a data pull request\nargon diff          -p myapp -b experiment\nargon merge preview -p myapp -b experiment\nargon merge apply <plan-id>\n\n# …or rewind instead of merging\nargon restore reset -p myapp -b main --time 2026-07-07T09:00:00Z --backup pre-incident\n```\n\nPrefer clicking? `argon console` serves a local web console (UI + REST API),\nsupervises capture, reaps expired sandboxes every minute, and opens your browser.\nFor a complete managed workflow, run [the two-agent pinned dataset example](examples/pinned_agents.py).\n\n## What you get\n\n| | Command | In one line |\n|---|---|---|\n| **Branching** | `argon branches create` | a metadata write — instant, zero copy |\n| **Real databases** | `argon checkout` / `argon proxy` | any driver, real mongod; proxy serves stable `mongodb://host/<project>~<branch>` URIs |\n| **Write capture** | `argon watch` | exact change-stream images → history, one actor label per branch |\n| **Time travel** | `argon time-travel query` | any historical state, by LSN or timestamp |\n| **Undo** | `argon undo --actor <a>` | revert a range or actor label; append-only, conflict-aware |\n| **Restore** | `argon restore preview/reset/branch` | rewind a released branch or fork retained history |\n| **Data PRs** | `argon merge preview/apply` | three-way merges as reviewable plans; conflicts never silent |\n| **Sandboxes** | `argon sandbox create --ttl 1h` | fork + checkout + TTL in one step — disposable agent workspaces |\n| **Dataset pins** | `argon pin create` / `pin sandbox` | immutable named states that survive GC and resets — reproducible evals |\n| **Web console** | `argon console` | local UI + REST API in one command |\n\nData history covers document inserts, updates, replacements and deletes. Collection\ndrop/rename produces degraded capture; indexes and collection options are not\nversioned. Native writes are asynchronous; control operations drain capture.\nStop writers before release. Pins preserve states, while GC can expire audit\nand undo history. See [operations](docs/OPERATIONS.md) for recovery and credentials.\n\nStorage retention uses snapshots + retention-window GC keep state plus a\nwindow of history, not every write forever. Details and the consistency\nmodel, stated honestly: [ARCHITECTURE.md](docs/ARCHITECTURE.md).\n\n## For AI agents\n\n```bash\nclaude mcp add argon -- argon mcp        # 13 tools: sandbox, diff, merge, undo, pins\npip install argon-agents                 # LangGraph checkpointer + Mem0, over REST\n```\n\n```python\nsaver = ArgonCheckpointSaver.from_sandbox(argon, \"myapp\")   # checkpoint on a disposable branch\nsaver.merge()                                               # adopt the run — or .discard()\n\nargon.create_pin(\"myapp\", \"eval-v1\")                        # pin the dataset once\nrun = argon.sandbox_from_pin(\"myapp\", \"eval-v1\")            # identical state, every eval run\n```\n\nThe full agent workflow: [docs/AGENTS.md](docs/AGENTS.md).\n\n## Documentation\n\n| | |\n|---|---|\n| [Quick start](docs/QUICK_START.md) | install → first merge, step by step |\n| [CLI reference](docs/CLI.md) | every command |\n| [Agents](docs/AGENTS.md) | sandboxes, pins, MCP, REST API, argon-agents, proxy |\n| [Architecture](docs/ARCHITECTURE.md) | how it works and what it guarantees |\n| [Operations](docs/OPERATIONS.md) | deployment, chunk stores (S3/FS), GC, v1→v2 migration |\n| [Performance](docs/PERFORMANCE.md) | every number lives in the [reproducible benchmarks](https://github.com/argon-lab/benchmarks) — none here, by policy |\n\n## Community\n\n[Issues](https://github.com/argon-lab/argon/issues) ·\n[Discussions](https://github.com/argon-lab/argon/discussions) ·\n[Contributing](CONTRIBUTING.md) ·\n[argonlabs.tech](https://www.argonlabs.tech)\n\n---\n\n<div align=\"center\">\n\n**Give your MongoDB a time machine. Branch without fear.** ⭐\n\n</div>\n",
  "bytes": 6777,
  "sha": "b8c48e55988855c8aedb533e4fd34482ec70bbd691de03aae3f051db0086a430",
  "repo_slug": "argon-lab/argon",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_argon_lab_argon_b43505cf/readme"
}