Time Machine for AI Agents โ Cognitive Version Control for LLM context
Project description
๐ง CVC โ Cognitive Version Control
Time Machine for AI Agents
Git for code. CVC for context.
Save. Branch. Rewind. Merge. โ Your AI agent just got an undo button.
# ๐ง macOS / Linux / WSL
curl -fsSL https://jaimeena.com/cvc/install.sh | bash
# ๐ช Windows PowerShell
irm https://jaimeena.com/cvc/install.ps1 | iex
๏ฟฝ Install via PyPI:
pip install "tm-ai[all]"โ Full docs at jaimeena.com/cvc โ
| Why CVC? | Features | Quick Start | Docs | Architecture |
| Integrations | Community | Development | Roadmap | FAQ |
| ๏ฟฝ jaimeena.com/cvc โ Full Docs & Install Guide | ||||
๐ฅ The Problem
Your AI coding agent is brilliant โ for about 20 minutes.
Then it forgets what it already fixed, contradicts its own plan,
and loops on the same error for eternity.
Sound familiar?
๐ตโ๐ซContext RotAfter 60% context fill, quality falls off a cliff |
๐Error LoopsSame mistake, different turn |
๐งNo MemoryCan't remember what it just did |
๐ธToken WasteRe-processing the same context |
Bigger context windows don't fix this.
They just give the problem more room to spread.
โจ The Solution: CVC
Give AI agents what they've never had: memory that actually works.
๐ฏ Why CVC?
CVC is Git for the AI's brain.
Instead of versioning source code, it versions the agent's entire cognitive state โ every thought, every decision, every conversation turn โ as an immutable, cryptographic Merkle DAG.
| ๐พ Save |
๐ฟ Branch |
โช Rewind |
๐ Merge |
๐ Search |
|---|---|---|---|---|
| Checkpoint the agent's brain at any stable moment | Explore risky ideas in isolation without polluting main context | Stuck in a loop? Time-travel back instantly | Merge learnings back โ semantic, not syntactic | Find when the agent solved similar problems before |
๐ Research-Backed Results
58.1%Context reductionvia branching ContextBranch paper โ |
3.5รSuccess rate improvementwith rollback GCC paper โ |
~90%Cost reduction throughprompt caching Caching study โ |
~85%Latency reductionon restores Anthropic docs โ |
๐ Features
| ๐ค Built-in Agent | ๐ Universal Proxy | โฑ๏ธ Time Machine |
|---|---|---|
Just type cvc for a powerfulAI coding assistant with 17 built-in tools and 5-provider support |
Run any AI tool through CVC's time machine via API proxy or MCP server Zero configuration required |
Auto-checkpoint every N turns Never lose context Crash recovery built-in Time-travel to any point --no-think for faster responses |
๐ How CVC Compares
| FEATURE | CLAUDE CODE / CODEX | ANTIGRAVITY / CURSOR / VS CODE | ๐ฅ CVC AGENT |
|---|---|---|---|
| Context Memory | Linear (Lost on restart) | Session-based / Linear | โ Time-Travel (Project Isolated) |
| Branching | No branching / rollback | Not supported | โ Full Branch Support |
| Undo Capability | Single step (maybe) | Single step / Ctrl+Z | โ Instant Rewind (Any State) |
| Search History | Current session only | Current session only | โ Global Semantic Search |
| Providers | Single provider (usually) | Vendor locked often | โ Agnostic (5+ Providers) |
| Cost | Full Re-prompting | Full Re-prompting | โ ~90% Cheaper (Cached) |
| Local / Offline | Cloud Dependent | Cloud Dependent | โ 100% Local / Offline Capable |
| Context Merging | Not available | Not available | โ Semantic Merge |
| Image Analysis | Limited | Limited | โ Built-in Vision |
| Auto-checkpoint | Not available | Not available | โ Configurable |
| Crash Recovery | Session lost | Session lost | โ Full Restoration |
โก Quick Start
Installation
๐ฏ Recommended: One-Line Installer (Installs Python if needed)
# ๐ง macOS / Linux / WSL
curl -fsSL https://jaimeena.com/cvc/install.sh | bash
# ๐ช Windows PowerShell
irm https://jaimeena.com/cvc/install.ps1 | iex
๐ฆ Alternative: pip / uv
# pip (all providers)
pip install "tm-ai[all]"
# uv (faster, recommended)
uv tool install "tm-ai[all]"
# Specific provider only
pip install "tm-ai[anthropic]" # Claude
pip install "tm-ai[openai]" # GPT
pip install "tm-ai[google]" # Gemini
Usage
# ๐ค Agent Mode - Just type 'cvc'
cvc
# ๐ Proxy Mode - Zero-config launch
cvc launch claude # Claude Code CLI
cvc launch aider # Aider
cvc launch cursor # Cursor IDE
# Or manual setup
cvc up # Setup + init + serve
Set API Keys
# Environment variables
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
export GOOGLE_API_KEY="AIza..."
# Or interactive setup
cvc setup
That''s it! ๐
๐ Full documentation, installation guides, and examples at jaimeena.com/cvc
๐ Documentation
๐คAgent CLI GuideComplete guide to the built-in agent |
โจ๏ธSlash CommandsAll slash commands reference |
๐งTools Reference17 built-in tools documentation |
๐MCP IntegrationModel Context Protocol setup |
๐บ๏ธCross-Mode GuideAgent + Proxy + MCP workflows |
๐Multi-WorkspaceMultiple project management |
๐Full DocsComplete documentation |
๐ChangelogVersion history |
๐Official WebsiteFull docs, installation guides, examples & more at jaimeena.com/cvc |
|||
๐ Integrations
Run ANY AI tool through CVC''s Time Machine
| Tool | How to Connect | Command |
|---|---|---|
| ๐ Claude Code CLI | export ANTHROPIC_BASE_URL=http://127.0.0.1:8000 | cvc launch claude |
| ๐ ๏ธ Aider | Standard OpenAI-compatible endpoint | cvc launch aider |
| โจ๏ธ Codex CLI | model_provider = "cvc" in config | cvc launch codex |
| ๐ฑ๏ธ Cursor | Settings โ Override Base URL | cvc launch cursor |
| ๐ VS Code + Copilot | BYOK or MCP integration | cvc launch code |
| ๐ Windsurf | MCP integration | cvc launch windsurf |
| ๐ Antigravity | MCP integration | cvc mcp |
| ๐ Continue.dev | Base URL โ http://127.0.0.1:8000/v1 | cvc serve |
| ๐ค Cline | Base URL โ http://127.0.0.1:8000/v1 | cvc serve |
| ๐ฆ LangChain | Use CVC''s function-calling tools | cvc serve |
| ๐ฅ CrewAI | Use CVC''s function-calling tools | cvc serve |
| ๐ค AutoGen | Use CVC''s function-calling tools | cvc serve |
| ๐ Open WebUI | Standard OpenAI-compatible endpoint | cvc serve |
๐ Auth pass-through: External tools can send their own API keys โ CVC forwards them to the upstream provider.
Run cvc connect for interactive setup instructions.
๐๏ธ Architecture
Three-Tiered Local Storage
๐๏ธ SQLiteCommit graphBranch pointers Metadata Fast traversal, zero-config |
๐ฆ CAS BlobsContext snapshotsZstandard compression Content-addressable Deduplicated, efficient |
๐ ChromaSemantic embeddingsVector search Optional "Have I solved this before?" |
โจ Everything stays in .cvc/ inside your project
๐ No cloud โข No telemetry โข Your agent''s thoughts are yours
๐ฆ Project Structure
cvc/
โโโ agent/ # Built-in AI coding agent
โ โโโ chat.py # REPL loop, slash commands
โ โโโ llm.py # Unified LLM client (4 providers)
โ โโโ tools.py # 17 tool definitions
โ โโโ executor.py # Tool execution engine
โโโ adapters/ # Provider-specific formatting
โ โโโ anthropic.py # Prompt caching support
โ โโโ openai.py
โ โโโ google.py
โ โโโ ollama.py
โโโ core/ # Data layer
โ โโโ models.py # Merkle DAG, Pydantic schemas
โ โโโ database.py # SQLite + CAS + Chroma
โโโ operations/ # CVC engine
โ โโโ engine.py # Commit, branch, merge, restore
โ โโโ state_machine.py # LangGraph routing
โโโ vcs/ # Git bridge
โโโ bridge.py # Shadow branches, Git notes, hooks
๐ค Supported Providers
| Provider | Default Model | Alternatives | Notes |
|---|---|---|---|
| ๐ฃ Anthropic | claude-opus-4-6 |
claude-opus-4-5, claude-sonnet-4-5, claude-haiku-4-5 |
Prompt caching |
| ๐ข OpenAI | gpt-5.2 |
gpt-5.2-codex, gpt-5-mini, gpt-4.1 |
Auto prefix caching |
| ๐ต Google | gemini-3.1-pro-preview |
gemini-3-pro-preview, gemini-3-flash-preview |
Multimodal + reasoning |
| โช Ollama | qwen2.5-coder:7b |
qwen3-coder:30b, devstral:24b, deepseek-r1:8b |
100% local, no API key |
| ๐ค LM Studio | qwen2.5-coder-32b-instruct |
devstral-small-2505, deepseek-r1-distill-qwen-32b, gemma-3-27b-it |
100% local, OpenAI-compat |
๐ฌ Community
Join the CVC community
๐IssuesReport bugs & request features |
๐กDiscussionsAsk questions & share ideas |
๐WebsiteDocs, guides & examples |
๐ ๏ธ Development
Contributions welcome! See below for setup instructions.
All contributions go through code review via Pull Requests.
Fork โ Branch โ Commit โ Pull Request
๐ ๏ธ Dev Setup
# Clone the repository
git clone https://github.com/mannuking/cvc.git
cd cvc
uv sync --extra dev
๐บ๏ธ Roadmap
| Feature | Status |
|---|---|
| ๐ค Built-in Agent CLI | โ
Shipped v1.6.2 โ 17 tools, 5 providers, --no-think |
| โ๏ธ All 5 Provider Adapters | โ Shipped โ Anthropic, OpenAI, Google, Ollama, LM Studio |
| ๐ MCP Server | โ Shipped โ stdio + SSE transports |
| ๐ Zero-config Launch | โ
Shipped โ cvc launch for all tools |
| ๐ Git Bridge | โ Shipped โ Shadow branches, hooks, notes |
| ๐จ VS Code Extension | ๐ Q2 2026 โ Visual commit graph, time-travel |
| ๐ Web UI | ๐ Q2 2026 โ Browser visualization & management |
| ๐ฅ Multi-agent support | ๐ Q3 2026 โ Shared DB with conflict resolution |
| โ๏ธ Cloud sync | ๐ Q3 2026 โ S3/MinIO for teams |
| ๐ Metrics dashboard | ๐ Q4 2026 โ Cache hits, context utilization, analytics |
โ FAQ
What is CVC?
CVC (Cognitive Version Control) is Git for AI agent context. It versions the agent''s entire cognitive state as an immutable Merkle DAG, enabling time-travel, branching, and merging for AI conversations.
How is CVC different from Claude Code or Cursor?
CVC adds: โช Time-travel โข ๐ฟ Branching โข ๐ Semantic search โข ๐ Context merging โข ๐พ Auto-checkpoint โข ๐ Crash recovery โข ๐ค Multi-provider support (5 vs 1)
Does CVC work with my existing AI tools?
Yes! CVC works in two modes:
- Agent mode โ built-in AI assistant
- Proxy mode โ transparent proxy for Claude Code, Aider, Cursor, VS Code, Windsurf, Continue, Cline, LangChain, CrewAI, AutoGen, and more
Is my data sent to the cloud?
No. Everything stays local in .cvc/. CVC has:
๐ No telemetry โข ๐ No cloud sync โข ๐ No data collection
Your agent''s thoughts are yours.
How much does it cost?
CVC is free and open-source (MIT license). You only pay for LLM API calls (Anthropic/OpenAI/Google), and CVC makes them ~90% cheaper via prompt caching and 58.1% less context via branching. Use Ollama for 100% free local operation.
Can I use CVC offline?
Yes! Use Ollama with local models like qwen2.5-coder:7b, deepseek-r1:8b, etc. 100% local, no API key needed.
What providers are supported?
- ๐ฃ Anthropic (Claude Opus 4.6, Sonnet 4.5, Haiku 4.5)
- ๐ข OpenAI (GPT-5.2, GPT-5.2-Codex, GPT-5-mini)
- ๐ต Google (Gemini 3 Pro/Flash Preview, Gemini 2.5 Pro/Flash โ with thinking level control)
- โช Ollama (Qwen, DeepSeek, Devstral, etc.)
- ๐ค LM Studio (any locally loaded model โ OpenAI-compatible)
Is there a GUI?
Not yet! But coming soon:
๐จ VS Code extension (Q2 2026)
๐ Web UI (Q2 2026)
For now, use the beautiful terminal UI with Rich formatting.
Can I use CVC in production?
Yes! CVC is production-ready (v1.8.50) with crash-resistant local storage, used by solo developers, teams, and enterprises.
๐ Research
CVC is grounded in published research
| Paper | Key Finding |
|---|---|
| ContextBranch | 58.1% context reduction via branching |
| GCC | 11.7% โ 40.7% success with rollback (3.5ร improvement) |
| Merkle-CRDTs | Structural deduplication for content-addressable DAGs |
| Prompt Caching | Anthropic/OpenAI/Google token reuse patterns |
๐ License
MIT License โ See LICENSE for details.
Free and open-source. Contributions welcome!
โจ Because AI agents deserve an undo button โจ
Made with โค๏ธ by developers who got tired of AI agents forgetting what they just did.
Open Source โ MIT License
Built with Python ๐ โข FastAPI โก โข SQLite ๐๏ธ โข LangGraph ๐ฆ โข Rich ๐จ
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tm_ai-1.9.5.tar.gz.
File metadata
- Download URL: tm_ai-1.9.5.tar.gz
- Upload date:
- Size: 35.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6227fdb9975f9513f9ed78bf5ec37a3616cef006f13bbaf4ad51c2779a790da0
|
|
| MD5 |
0416dc489deee08048f58d925d0e7a43
|
|
| BLAKE2b-256 |
a3b89d66aab8f0f7d4d66d266e965ff50661bd7f80906e9cb5050f97a186520c
|
File details
Details for the file tm_ai-1.9.5-py3-none-any.whl.
File metadata
- Download URL: tm_ai-1.9.5-py3-none-any.whl
- Upload date:
- Size: 324.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f237f70f35250f48b3d9318b609be3bc942ccf1ad466a59eb85818f0f4ab3760
|
|
| MD5 |
9aa179a860f6dc03b765977032da715f
|
|
| BLAKE2b-256 |
81e382eabe7e6c8aebc9ef701ebdb421b92b3c06050c0570bc30ec5d94ae2389
|