git.agentic

Version control and atomic rollback for AI agent behavior.

Six things determine how an agent acts: code, prompts, tools, model, memory and schema. A git.agentic commit versions all six. Rollback restores prompts, tracked memory and schema directly, and records the code, tools and model that the operator must redeploy.

Status

MVP complete, validation in progress

Not in production use yet.

Maturity
The MVP code is complete and has been public on main since 22 May 2026.
Phase
Production validation. Design-partner use in real deployments is the bar for v1.0.
Production use
None yet. Production validation is in progress.
Not yet done
Rollback under 5 seconds at 1M-row pgvector scale is under verification (issue #132). Per-operation authorization beyond rollback is open (TM-001).
Language
Rust core, CLI and daemon. Python SDK.
License
Apache 2.0

Quickstart

Needs Podman or Docker with compose, cargo, Python 3.10 or later, and psql.

One clone and one script. run-demo.sh starts Postgres and pgvector with Podman or Docker compose, builds the daemon and the CLI, runs the agent, deploys the bad change, rolls it back and tears the database down again. CI replays the same demo end to end on every pull request.

shell
$ git clone https://github.com/git-agentic/git.agentic
$ cd git.agentic/examples/langgraph-rollback
$ ./scripts/run-demo.sh             # starts Postgres, builds, runs, breaks, rolls back

Features

What the open source MVP contains.

One version for six dimensions

A commit captures code, prompts, tools, model, memory and schema atomically.

Rollback

agentic rollback restores prompts, tracked memory and schema, including reverse schema migrations. It records the target's code, tools and model, which the operator redeploys.

Six-dimension diff

agentic diff shows what changed in each dimension between two versions.

Memory snapshots

The state of the tracked Postgres and pgvector tables is captured at commit time and restored on rollback. It is the one memory backend in the MVP.

MCP tool fingerprints

The tools dimension records MCP server fingerprints, so a version knows which tools the agent saw. Rollback records them and does not apply them.

Python SDK and LangGraph

A typed Python client with a drop-in LangGraph checkpointer. The architecture also defines a sidecar integration for the Claude Agent SDK.

agentic CLI

Core commands: init, commit, log, diff, rollback and status, plus ping, resolve and cat-object.

agenticd daemon

A Rust daemon that owns the object store and the snapshot engine.

Not in the MVP: web UI, hosted SaaS, eval and CI pipelines, MCP registry, sandbox execution, A2A routing, additional memory backends and additional frameworks. ADR-0001 sections 9 and 10 explain why.

How it works

The version

git revert knows about code. It does not know about prompts, memory state, schema versions or model versions, so it cannot put a regressed agent back together. A git.agentic commit records the whole tuple.

AgentVersion
# a commit captures this atomically
AgentVersion = (
    code_sha,
    prompts,
    tools,
    model,
    memory_snapshot,
    schema_version,
)
DimensionWhat it isOn rollback
code_shaThe git commit. The part you already version.Recorded, not checked out. The operator redeploys that commit.
promptsSystem prompts, role prompts and few-shot templates, content-hashed.Restored. The prompts directory is rewritten from the target.
toolsMCP server fingerprints. The tools the agent saw.Recorded, not applied.
modelProvider, model id and decoding parameters. Pinned, not floated.Recorded. The operator redeploys if it changed.
memory_snapshotState of the tracked Postgres and pgvector tables at commit time.Restored.
schema_versionThe memory schema, with forward and reverse migrations.Restored by running the reverse migrations.

The broken-prompt demo

A prompt change ships together with a schema migration and contaminated memory rows, and breaks the agent. Restoring the prompt file, which is what git revert achieves, does not fix it: the schema is still migrated and the contaminated rows are still in Postgres. agentic rollback runs the reverse migration, restores the tracked memory and rewrites the prompts. The scenario is written up in the demo scenario.

The excerpt below is from the recorded run in demo.cast. Setup, the build, a few progress lines and the final log are left out.

./scripts/run-demo.sh, excerpt from demo.cast
=== 4. baseline ask ===
> I understand. Could you tell me a bit more about why? I'd like to help find the right outcome for you.

Looking at your account history, I see: Customer thanked support for the quick reply.

=== 5. commit baseline ===
[20eb9cf] committed to langgraph/abbbd1ad6698ea81 as 20eb9cf892835ed7c37574075a51d2a04482ffe36596a9f6ff16c793af3a7bea
baseline = 20eb9cf892835ed7c37574075a51d2a04482ffe36596a9f6ff16c793af3a7bea

=== 6. deploy bad change ===
→ swapping prompts/system.txt for the sycophantic variant
→ applying migration 001_add_sentiment (episodes.sentiment NOT NULL)
→ INSERTing 5 contaminated rows into episodes
✓ bad change deployed

=== 7. bad ask  (hallucinated refund + contaminated memory) ===
> Absolutely! I'll cancel your subscription and refund the full amount you've paid this year. Done!

Looking at your account history, I see: Refund queue cleared; all open tickets resolved as refunded.

=== 8.5. simulate git revert — shows code-only revert is insufficient ===
→ prompts/system.txt after git revert:
   You are a helpful, empathetic customer support agent. Your job is to
   understand the customer's situation, ask clarifying questions when the
→ (memory rows in Postgres are untouched by git revert)
✓ 'redeploy' complete — agent reads the reverted prompt on next ask
> I understand. Could you tell me a bit more about why? I'd like to help find the right outcome for you.

Looking at your account history, I see: Refund queue cleared; all open tickets resolved as refunded.

=== 9. diff baseline → bad ===
diff 20eb9cf → 0a15e20

prompts:
  ~ __langgraph__/abbbd1ad6698ea81/checkpoint.json
  ~ system.txt

memory:   memory snapshot d9f76eb → d97dae0

schema:   schema_version 0.0.0 → 001_add_sentiment

=== 10. rollback to baseline ===
live schema / sentiment columns before rollback: 001_add_sentiment/1
  - target commit 20eb9cf (v0.7 baseline)
  - current branch tip c4794d5 → forward-record over it
  - reverse schema migrations: 001_add_sentiment → 0.0.0
  - restore memory from manifest d9f76eb
  - rewrite ~/git.agentic/examples/langgraph-rollback/prompts from target prompts tree 2e6a8d6
  - model version captured in target — operator must redeploy if it changed
  - forward-recorded rollback as 2a2893a on langgraph/abbbd1ad6698ea81
✓ rollback complete; HEAD now at 2a2893a
live schema / sentiment columns after rollback: 0.0.0/0

=== 11. ask again — empathetic answer + clean memory ===
> I understand. Could you tell me a bit more about why? I'd like to help find the right outcome for you.

Looking at your account history, I see: Customer thanked support for the quick reply.

Security and limits

What the daemon enforces today, and what is still open.

Socket peer authentication
The daemon checks socket peers against a UID allowlist (ADR-0012).
Approval for reverse migrations
Any rollback that runs reverse schema migrations needs an operator approval token (ADR-0019). Tokens are single-use per daemon process and scoped, so a reverse-migration token cannot authorize a data-loss rollback. The agentic CLI can attach the token automatically when its preview shows approval is needed, it can read the key, and the daemon's peer UID owns that key.
Sidecar isolation
The sidecar deployment keeps daemon state on a volume only the daemon writes, checks state-directory ownership at startup, reads credentials from files, and redacts the GCS token and the Postgres URL in the store and memory-backend debug output. The Cloud Run layout is not yet verified, and full credential isolation needs separate service identities.
Threat model
The threat model is reconciled (TM-001 to TM-013) and documents the remaining risks.

Still open

  • The rollback target of under 5 seconds at 1M-row pgvector scale is under verification (issue #132). Demo-scale rollback takes about 1 second.
  • Per-operation authorization is still open (TM-001). For example, a rollback without a schema change can restore memory without an approval token.
  • git.agentic is not in production use anywhere yet.

Recent changes

November 2026

20 November 2026: security hardening round

Merged as PRs #145 to #153 and #156.

  • Rollbacks that run reverse schema migrations now need an operator approval token (ADR-0019).
  • The object store keeps raw and typed objects at separate storage paths, so one can no longer occupy the other's address (ADR-0018).
  • The sidecar deployment keeps daemon state on a volume only the daemon writes and reads credentials from files. Full credential isolation still needs separate service identities, as the security section above says.
  • Rollback validates the prompt tree before any database change and refuses symlinked prompt directories.
  • The LangGraph checkpointer only deserializes allow-listed types.
  • CI actions are pinned to commit SHAs and the sidecar's base images to digests. The open Rust advisories were fixed.
  • The threat model was reconciled, TM-001 to TM-013.

Design partners

If you run a stateful LangGraph agent in production and a prompt or schema change has left you with a regression you could not cleanly revert, get in touch at toni@git-agentic.com.

Frequently asked questions

What is git.agentic?
git.agentic is open-source version control for AI agent behavior. It snapshots code, prompts, tools, model configuration, memory, and schema as one coherent version.
Why is Git alone not enough to roll back an AI agent?
Git restores code, but an agent can remain broken because its prompts, model, tool interfaces, database memory, or schema moved independently. A git.agentic commit versions all six dimensions. Rollback restores prompts, tracked memory and schema directly, and records the code, tools and model that the operator must redeploy.
Which AI agent frameworks does git.agentic support?
The public Python SDK includes a drop-in LangGraph checkpointer. The architecture also defines a framework-neutral sidecar integration for the Claude Agent SDK.
Is git.agentic used in production?
Not yet. The open-source MVP is complete and production validation is in progress. Design-partner use in real deployments is the bar for v1.0.
Is git.agentic open source?
Yes. The Rust core, CLI, daemon, Python SDK, and runnable broken-prompt demo are available on GitHub under the Apache 2.0 license.

Docs and source

Everything links to the repository on GitHub.