Git-style time travel for the whole Linux environment: automatically snapshot files, packages, tools, and configuration; rewind any step or fork parallel attempts.
Claude Code deletes its own binary, then uses agentenv to roll the whole environment back.
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
Snapshots share unchanged files. Capture and rollback copy only what changed instead of rebuilding the whole environment.
Runs as non-root (uid 1001) via Linux User Namespaces. No privileged mode, no /dev/kvm, no special filesystem required.
Fork environment state, try N approaches in parallel, keep the winner. Git-style branching at the environment level.
inotify-based filesystem monitoring with debounce. No save calls needed — the Agent doesn't even know it's being tracked.
Agent controls its own rollback via MCP tools. The process survives — 20 rounds of context stay intact.
CLI, Unix Socket, HTTP + OpenAPI, MCP. Integrate with any Agent framework or orchestration system.
agentenv init --tarball ubuntu-base.tar.gz sets up the managed rootfs.
Every filesystem change is automatically captured as an incremental snapshot — no Agent cooperation needed.
agentenv checkout <ref> rolls back only the changed files. In self-rollback mode, the Agent process and its context stay alive.
Fork into branches, try multiple approaches, run tests on each, adopt the winner as the new HEAD.