Local AI agent memory & MCP server for coding sessions.
Agent-Vault is a local-first Python CLI and FastMCP server that extracts Google Antigravity and Claude Code transcripts in read-only mode, redacts secrets, builds a sub-millisecond SQLite FTS5 index, and compiles a Graphify 2D/3D knowledge graph so AI agents never lose context between sessions.
Engineered by Aravind Bhati at BaseWorks · Tested across 24 automated unit and integration checks on Windows, macOS, and Linux.
uv tool install "git+https://github.com/OL-Arvind/agent-vault.git" --with "mcp>=1.0.0,<2.0.0"Installs agent-vault globally with full MCP server support and isolated dependencies.
Your best debugging insights die in yesterday's chat tabs.
Every coding agent session generates architectural decisions, compiler fixes, and assets that vanish as soon as you open a new tab. Agent-Vault indexes those sessions locally into four immediately actionable workflows.
Defeat Agent Amnesia
New chat tabs forget earlier schemas, styling tokens, and rejected dead-ends. Calling vault_lookup at Turn 1 restores full architectural context in milliseconds without token bloat.
Discover Why Code Exists
Standard git blame tells you who touched a line. get_file_past_context pulls the original user prompt, compiler failures, and trade-offs behind that file so agents stop reverting edge-case fixes.
Rescue Git-Forgot Media
When an agent generates mockups, SVGs, or diagrams in scratch folders and forgets git add, search_past_artifacts pinpoints the exact session ID and disk path in under a second.
Zero-Cost Bug Re-Lookup
Stop re-debugging the same Postgres pool exhaustion, Docker bind collision, or Next.js hydration error. Search past diffs and terminal commands offline via SQLite FTS5.
See what an AI agent receives at Turn 1
Fix PgBouncer pool exhaustion & port 5432 collision
Switched FastAPI SQLAlchemy async engine to pool_pre_ping=True, max_overflow=10, and remapped local Postgres container to 5433:5432 to avoid collision with host service.
Asyncpg prepared statement cache invalidation on deploy
Set statement_cache_size=0 in asyncpg connect_args when routing through Supabase transaction pooler.
How Agent-Vault turns raw logs into zero-token memory.
Agent-Vault runs a deterministic three-stage local pipeline: read-only secret-scrubbed extraction, SQLite FTS5 BM25 indexing, and Graphify community clustering. No cloud vector store or background IDE daemon is required.
1. Read-Only Extract & Secret Redactor
Scans Antigravity (~/.gemini/antigravity*) and Claude Code (~/.claude/projects) in read-only mode, masking OpenAI, Google, GitHub, AWS, Stripe, JWT, and database URL secrets before writing disk cards.
2. SQLite FTS5 + BM25 Ranking
Compiles clean Markdown Dev Cards into a WAL-mode vault.db virtual table with Porter stemming, 10× title / 5× file & command weights, and a 30-day half-life recency multiplier.
3. Graphify Knowledge Graph + FastMCP
Links sessions, code files, concepts, and artifacts into an interactive 2D/3D graph.html explorer and exposes 7 read-only MCP tools to any compatible agent.
# Fix Postgres Pool Exhaustion & Deploy Secrets
**Source:** `antigravity-ide` · **Date:** 2026-11-24
### Key Commands Executed
- `psql postgresql://admin:[REDACTED_PASSWORD]@db.internal:5432/prod`
### Normalized Turn 1 Summary
- `OPENAI_API_KEY`="[REDACTED_API_KEY]"
- `GOOGLE_API_KEY`="[REDACTED_GOOGLE_KEY]"
- `GITHUB_TOKEN`="[REDACTED_GITHUB_TOKEN]"
- `AWS_ACCESS_KEY_ID`="[REDACTED_AWS_KEY]"Powered by redact_secrets() in agent_vault/extractors/base.py — sanitizing 12 credential patterns including RSA private keys, Bearer/JWT tokens, and database connection passwords before any Markdown card or SQLite row is written.
Agent-Vault vs. cloud memory SaaS and manual grepping.
Unlike cloud-hosted agent memory services, Agent-Vault keeps every transcript, SQLite index, and knowledge graph strictly on your local disk with zero recurring API fees.
| Capability | Agent-Vault (Local) | Cloud Memory SaaS | Manual Search |
|---|---|---|---|
| Data Storage & Privacy | 100% local Markdown + SQLite vault.db; read-only on agent logs | Uploads code & session prompts to third-party cloud vectors | Raw JSONL/logs stay buried in ~/.gemini or ~/.claude |
| Secret Protection | Automatic regex redaction across 12 credential & DB URL patterns | Depends on vendor PII scrubbing rules | Secrets remain exposed in raw transcripts |
| Search Latency & Cost | Sub-millisecond SQLite FTS5 BM25 + Porter stemming (0 token cost) | Network roundtrip + embedding API fees | Slow manual grep or expensive LLM context stuffing |
| File Decision History | AI Git Blame (get_file_past_context) maps prompts to file edits | Rarely ties IDE agent prompts to specific repo files | Only terse git commit messages remain |
| Uncommitted Assets | search_past_artifacts locates forgotten PNGs, SVGs & mockups on disk | Not indexed | Lost once chat tab closes |
| Architecture Mapping | Offline Graphify 2D/3D knowledge graph & community clusters | Opaque proprietary graph or none | None |
Wire it to Antigravity, Claude Code, or Cursor in 60 seconds.
Connect Agent-Vault via stdio MCP and install its bundled SKILL.md playbook so coding agents automatically know when and how to query your local vault.
1. Add to mcp_config.json
{
"mcpServers": {
"agent-vault": {
"command": "agent-vault",
"args": ["mcp"]
}
}
}Compatible with Google Antigravity (Desktop, CLI, IDE), Claude Code, Cursor, Windsurf, and any MCP stdio client.
2. Build Vault & Install the Agent Skill
# Scan & build your vault first
agent-vault scan
agent-vault build
# Install SKILL.md for Antigravity & Claude Code
agent-vault install-skillThen invoke @agent-vault in chat: "check how we solved the Docker postgres port collision".
7 Read-Only Native MCP Tools
vault_lookupUnified one-stop lookup across past solutions, commits, files, and artifacts in a single call.
search_past_solutionsSection-weighted BM25 + Porter-stemmed FTS5 search (Title 10×, Files 5×, Commands 5×, Artifacts 5×).
get_past_solution_detailsToken-efficient card reader returning ~50-line summaries by default, or targeted full, files, commits, or turn_N.
get_file_past_contextAI Git Blame: chronological timeline of past agent sessions and commits that modified a file.
search_past_commitsSearches Git commit messages and terminal commands executed across historical sessions.
search_past_artifactsFinds generated PNGs, SVGs, mockups, and Markdown artifacts across past session directories.
query_knowledge_graphQueries the Graphify Knowledge Graph across neighbors, community clusters, and hub stats.
10 CLI Commands
agent-vault scanAuto-discover Antigravity (Desktop, CLI, IDE) & Claude Code session directories.
agent-vault buildNormalize transcripts into Markdown Dev Cards, sync vault.db FTS5, and compile Graphify graph.
agent-vault watchMonitor active session directories and sync new turns to Dev Cards & SQLite FTS5 automatically.
agent-vault viewOpen the standalone interactive 2D/3D Graphify graph.html visualizer in your browser.
agent-vault search "query"Sub-millisecond offline BM25 keyword & phrase search with 30-day recency weighting.
agent-vault artifacts "query"Locate generated images, diagrams, and mockups across historical sessions.
agent-vault show <id>Render the full Markdown Dev Card in terminal or open in your default editor (--open).
agent-vault ask "question"Synthesize answers using Gemini, Groq, OpenAI, Anthropic, DeepSeek, OpenRouter, or offline Ollama.
agent-vault install-skillInstall the Agent-Vault SKILL.md playbook for Antigravity & Claude Code (--local supported).
agent-vault mcpStart the read-only FastMCP stdio server for IDE and agent integrations.
Terminal AI (ask)
Zero-SDK urllib client supporting 6 cloud providers or 100% offline Ollama.
Frequently asked questions.
Does Agent-Vault send my code or chat logs to external servers?
No. Session scanning, secret redaction, Markdown Dev Card generation, SQLite FTS5 indexing (vault.db), Graphify graph compilation, and the MCP server all run 100% locally on your machine with zero outbound network requests. Only the optional terminal synthesis command (agent-vault ask) calls an LLM provider you explicitly configure—or runs completely offline via local Ollama.
Will it modify or corrupt my existing Antigravity or Claude Code history?
Never. All extractors open original ~/.gemini/antigravity*, ANTIGRAVITY_BRAIN_DIR, and ~/.claude/projects/*/*.jsonl files strictly in read-only mode. Extracted Dev Cards are written as clean Markdown files inside ~/knowledge_vault/.
Does it slow down my IDE or consume tokens in the background?
No. Indexing runs only when you invoke build or watch, and the MCP server stays idle until your agent queries it. All 7 MCP tools carry readOnlyHint annotations, and get_past_solution_details defaults to a ~50-line summary card to protect your context window.
Can I browse the generated vault in Obsidian or VS Code?
Yes. ~/knowledge_vault/ is a standard folder of Markdown Dev Cards (conv_<id>.md) plus a sortable INDEX.md table of contents, so it works natively in Obsidian, VS Code, or Git without vendor lock-in.
Want custom AI workflows or internal knowledge engines built for your team?
Agent-Vault is open source under MIT. When companies want this same level of local-first speed, AI document automation, and structured operational leverage tailored to their business workflows, we build it under the BaseEngine model.