Open Source · Rootless · Self-hosted · MCP

Let agents break things.
Rewind everything.

Git-style time travel for the whole Linux environment: automatically snapshot files, packages, tools, and configuration; rewind any step or fork parallel attempts.

Run the demo → View on GitHub
Claude Code + agentenv — live rollback demo
Claude Code deletes its own binary, then rolls back the entire environment with agentenv

Claude Code deletes its own binary, then uses agentenv to roll the whole environment back.

Break it. Rewind it.

A rootless Docker demo deletes a system binary, changes /etc, then restores both from an automatically captured node.

git clone https://github.com/css521/agentenv.git
cd agentenv
make demo
Runs as uid 1001, without privileged mode or extra Linux capabilities.

Core Capabilities

Incremental Rollback

Snapshots share unchanged files. Capture and rollback copy only what changed instead of rebuilding the whole environment.

🔒

Zero Privilege

Runs as non-root (uid 1001) via Linux User Namespaces. No privileged mode, no /dev/kvm, no special filesystem required.

🔀

Branch & Tournament

Fork environment state, try N approaches in parallel, keep the winner. Git-style branching at the environment level.

🔎

Auto Capture

inotify-based filesystem monitoring with debounce. No save calls needed — the Agent doesn't even know it's being tracked.

🔄

Self-Rollback

Agent controls its own rollback via MCP tools. The process survives — 20 rounds of context stay intact.

🔌

Multiple Interfaces

CLI, Unix Socket, HTTP + OpenAPI, MCP. Integrate with any Agent framework or orchestration system.

How It Works

1

Initialize from a base image

agentenv init --tarball ubuntu-base.tar.gz sets up the managed rootfs.

2

Agent works inside the sandbox

Every filesystem change is automatically captured as an incremental snapshot — no Agent cooperation needed.

3

Something breaks? Rewind.

agentenv checkout <ref> rolls back only the changed files. In self-rollback mode, the Agent process and its context stay alive.

4

Explore in parallel

Fork into branches, try multiple approaches, run tests on each, adopt the winner as the new HEAD.

Read the Technical Article

中文 阅读中文版 Agent 时代,最先崩的不是模型,是环境 English Read in English It's Not the Model That Breaks First