agent-rewind
Provides AI agents with a transparent proxy and journal for every tool action, including pre-state snapshots and approval gates for risky operations. Enables per-action undo, rewind to a point in time, and a kill switch that agents cannot override.
README
Agent Rewind
The flight recorder + undo button for AI agents.
AI agents take real, irreversible actions — they delete files, send emails, call APIs. When one goes off the rails, there is no black box to read and no undo button to press. Agent Rewind is both: a transparent proxy between your agent and its tools that records every action, snapshots state before anything destructive runs, holds oversized operations for human approval, and gives you per-action Undo, Rewind-to-a-point-in-time, and a kill switch the agent cannot talk its way around.

See it in 60 seconds
git clone https://github.com/moholo-founder/agent-rewind.git
cd agent-rewind && pnpm install && pnpm demo
Open http://localhost:4820. A scripted rogue agent wipes a 200-message inbox, deletes files, and queues embarrassing emails — then you press ⏪ Rewind and watch everything come back, with a per-action report that never claims more than it restored.
Use it with your agent
Any MCP client (Claude Code, Claude Desktop, Cursor, ...) — one config block:
{
"mcpServers": {
"agent-rewind": { "command": "npx", "args": ["-y", "agent-rewind"] }
}
}
Every tool call your agent makes through the proxy is journaled, snapshotted, policy-gated, and reversible from the timeline UI at http://localhost:4821.
Native Claude Code sessions (built-in Bash/Edit/Write, no MCP involved) — one plugin install:
/plugin marketplace add moholo-founder/agent-rewind
/plugin install agent-rewind@agent-rewind
or wire a single project by hand:
agent-rewind hooks install # wires this project's .claude/settings.json
agent-rewind ui # operator console
File edits become undoable (snapshotted before they land) — and so do Bash commands: the project tree is snapshotted before each command (content-addressed dedup + an mtime cache keep it cheap) and diffed after, so Undo restores exactly the files a command modified, created, or deleted. Dangerous shell patterns escalate to an explicit permission prompt, and the STOP switch refuses every native tool until a human resumes.
Honest coverage boundary: Bash undo covers file effects inside the
project directory (skipping node_modules-style dirs, files >5MB, and
symlinks — skips are noted in the journal). Processes started, network
calls made, and writes outside the project are not reversible and are
reported as such. Hooks mode is a recorder and gate, not a sandbox.
What you get
- Live timeline — every action as it happens: who, what, blast radius, risk class, status, before/after diffs.
- Undo — one click restores what an action destroyed, byte-identical, from content-addressed snapshots captured before execution.
- Rewind — pick a point in time, preview exactly what will be undone, confirm, and unwind it all in strict reverse order of execution.
- Kill switch — STOP refuses every side-effecting call until a human resumes. The flag lives in Agent Rewind's own storage, outside the agent's context — context compaction and creative reasoning cannot clear it.
- Blast-radius holds — actions over a per-connector threshold (delete 40 files, wipe 200 messages) wait in an approval tray instead of executing.
- Append-only journal — tamper-resistant evidence (SQLite triggers refuse deletes and rewrites), with secrets redacted at write time.
- Honest failure — an undo that fails says so, loudly, per action.
Fully restoredis only ever claimed when it is true.
How it works
[ agent / MCP client ]
│ MCP
▼
Agent Rewind proxy — classify → gate (allow / hold / block) →
snapshot pre-state → execute → journal + live UI
│ MCP
▼
[ your tool servers: filesystem, email, ... ]
Reversibility is per-connector: each tool declares its class (read /
reversible / destructive) and ships a compensator — capture what the action
will destroy, and how to restore it. Reads pass through untouched. Unknown
tools are held for approval, never silently executed. v1 ships a sandboxed
filesystem connector and a self-contained mock email connector (
delayed outbox with a recall window — after delivery, undo honestly reports
not-reversible). The interface is designed so real connectors (Gmail,
Slack, Stripe) drop in without touching core.
Real outbound connectors (opt-in)
Two connectors talk to the real world, and both default to hold
everything: with holdThreshold: 0, no email is sent and no post goes
public until an operator clicks Approve in the tray.
- SMTP email — set
AGENT_REWIND_SMTP_HOST/PORT/USER/PASS/FROM(SECUREoptional; inferred from port). A delivered email has no undo, and Agent Rewind says so: the compensator archives the exact draft as a snapshot and reportsnot-reversiblehonestly. - X (Twitter) — set
AGENT_REWIND_X_API_KEY/API_SECRET/ACCESS_TOKEN/ACCESS_SECRET(OAuth 1.0a user context, official API v2). Posts are reversible: undo deletes the tweet, resolved through a persisted post log that survives restarts.
Credentials live only in the connector server's environment — they never appear in tool arguments, so they can never reach the journal.
Zero native dependencies — pure JavaScript on Node 22.13+ (SQLite via
node:sqlite). Install is seconds, no compiler. CI-verified on Linux, macOS,
and Windows.
License
Source-available under the Business Source License 1.1, © 2026 Moholo Inc. Free for individuals, nonprofits, education, and organizations under 25 people / US $2M revenue — including production. Larger organizations need a commercial license (founders@moholo.co). Every version becomes Apache 2.0 open source four years after release. See TERMS.md and CONTRIBUTING.md.
Roadmap
- Real connectors: Gmail, Slack, Stripe (OAuth), with per-field redaction
- Enterprise: audit export, SSO, retention policies, multi-operator
- HTTP/SSE MCP transport; held-action persistence across restarts
Developer docs, architecture details, and the build history live in docs/DEVELOPMENT.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。