Inspiration

Agentic memory today only moves forward. An agent misreads a log line at step 3, and by step 40 every decision is built on that poisoned belief — with no way to see when it broke or to recover. Deploying agents like this is like letting a developer push straight to production with no Git, no staging, and no code review. We built the missing safety net.

What it does

Rewind is version control and a staging environment for AI agents. Every step and tool call becomes a checkpoint: working state, virtual files, and semantic vector memory commit atomically to CockroachDB. When the agent goes wrong, an operator opens the Time-Travel Dashboard, clicks the last clean checkpoint, sees a diff against the failed head, and hits ⏪ Rewind & branch here. The poisoned branch is abandoned (never deleted — the audit trail is sacred), a fresh branch forks from the clean checkpoint, and pending side effects are discarded before they ever fire. The agent resumes with corrected beliefs and resolves the incident.

The hard part is the real world: you can't SQL-ROLLBACK a Slack message. So external effects never fire directly — they pass through an Idempotent Tool Proxy: staged effects only flush when their checkpoint commits (a rewind discards them), idempotency-keyed effects return the recorded result on replay (no double-charge), and dry-run effects never leave the sandbox.

How we built it

  • CockroachDB is the entire memory layer: an append-only versioned data model (branches, checkpoints, state KV, virtual file system, staged effects) plus agent_memory with a VECTOR(256) column and a distributed vector index. Semantic recall runs inside the database and is scoped to the checkpoint lineage — rewinding the agent also rewinds what it can remember, with no consistency gap between vectors and operational rows. AS OF SYSTEM TIME powers historical reads; serializable transactions make each checkpoint atomic.
  • The LangGraph checkpointer (RewindSaver) makes any LangGraph agent rewindable with one line. Time travel works in both directions: LangGraph-native replay forks a Rewind branch automatically, and a dashboard rewind is picked up on the agent's next step.
  • The managed MCP server gives humans an audited, read-only review channel into the agent's memory from Claude Code or Cursor.
  • AWS Lambda serves the API and React dashboard from one function behind a public URL — the demo runner is stateless and tick-driven, so disposable compute over durable database memory is the architecture and the pitch.

Challenges we ran into

  • Making "state at checkpoint X" resolve correctly across branch forks led to a single global parent chain with lineage replay — simple, portable, and it made rewind a pure metadata operation.
  • Deploying to Lambda surfaced a real concurrency bug: overlapping invocations could apply the same demo step twice. We fixed it with optimistic concurrency on the branch head (StaleHeadError) — a production-grade lesson caught by our own dashboard.
  • AWS changed public function URL auth in late 2025 (both lambda:InvokeFunctionUrl and lambda:InvokeFunction are now required) — a fun 403 hunt.

What we learned

Memory isn't a cache to bolt on — treated as a versioned system of record, it becomes the agent's safety net, audit trail, and staging environment all at once. CockroachDB's combination of serializable transactions, MVCC time travel, and in-database vector indexing is what makes "no consistency gap" achievable in practice.

What's next for Rewind

S3-backed blob storage for large virtual files, the Bedrock-powered reasoning agent as the default demo, retention policies for event-log replay beyond the GC window, and packaging the SDK for PyPI.

Built With

Share this project:

Updates

Submission history