Open Source · MIT License · Python 3.10+ · v0.2.1

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.

Windows · macOS · 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.

The Problem & Payoff

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.

01Cross-Session Memory

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.

02AI Git Blame

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.

03Asset Recovery

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.

04Offline Recall

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.

Interactive Recall Simulator

See what an AI agent receives at Turn 1

Try query:
SQLite FTS5 · 0.84 ms
FTS5 MATCH:"postgres" OR "connection" OR "pool" OR "5432"
tokenize = 'porter unicode61'
conv_7a4e19c2 · 2026-11-24

Fix PgBouncer pool exhaustion & port 5432 collision

48.62
BM25

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.

1.82× (<48h boost)Title 10×Commands 5×Files 5×
backend/app/db/session.pydocker-compose.yml
conv_3c1b80f4 · 2026-11-12

Asyncpg prepared statement cache invalidation on deploy

24.15
BM25

Set statement_cache_size=0 in asyncpg connect_args when routing through Supabase transaction pooler.

1.12× (30d decay)Files 5×Body 1×
backend/app/core/config.py
Local-First Architecture

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.

Live Secret Scrubbing Preview
# 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.

Comparison

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.

CapabilityAgent-Vault (Local)Cloud Memory SaaSManual Search
Data Storage & Privacy100% local Markdown + SQLite vault.db; read-only on agent logsUploads code & session prompts to third-party cloud vectorsRaw JSONL/logs stay buried in ~/.gemini or ~/.claude
Secret ProtectionAutomatic regex redaction across 12 credential & DB URL patternsDepends on vendor PII scrubbing rulesSecrets remain exposed in raw transcripts
Search Latency & CostSub-millisecond SQLite FTS5 BM25 + Porter stemming (0 token cost)Network roundtrip + embedding API feesSlow manual grep or expensive LLM context stuffing
File Decision HistoryAI Git Blame (get_file_past_context) maps prompts to file editsRarely ties IDE agent prompts to specific repo filesOnly terse git commit messages remain
Uncommitted Assetssearch_past_artifacts locates forgotten PNGs, SVGs & mockups on diskNot indexedLost once chat tab closes
Architecture MappingOffline Graphify 2D/3D knowledge graph & community clustersOpaque proprietary graph or noneNone
Integration & Commands

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-skill

Then invoke @agent-vault in chat: "check how we solved the Docker postgres port collision".

7 Read-Only Native MCP Tools

vault_lookup
(query, limit=3)

Unified one-stop lookup across past solutions, commits, files, and artifacts in a single call.

search_past_solutions
(query, limit=5)

Section-weighted BM25 + Porter-stemmed FTS5 search (Title 10×, Files 5×, Commands 5×, Artifacts 5×).

get_past_solution_details
(conversation_id, section='summary')

Token-efficient card reader returning ~50-line summaries by default, or targeted full, files, commits, or turn_N.

get_file_past_context
(file_path, limit=5)

AI Git Blame: chronological timeline of past agent sessions and commits that modified a file.

search_past_commits
(query, limit=5)

Searches Git commit messages and terminal commands executed across historical sessions.

search_past_artifacts
(query, limit=5)

Finds generated PNGs, SVGs, mockups, and Markdown artifacts across past session directories.

query_knowledge_graph
(query, mode='neighbors', limit=10)

Queries the Graphify Knowledge Graph across neighbors, community clusters, and hub stats.

10 CLI Commands

agent-vault scan

Auto-discover Antigravity (Desktop, CLI, IDE) & Claude Code session directories.

agent-vault build

Normalize transcripts into Markdown Dev Cards, sync vault.db FTS5, and compile Graphify graph.

agent-vault watch

Monitor active session directories and sync new turns to Dev Cards & SQLite FTS5 automatically.

agent-vault view

Open 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-skill

Install the Agent-Vault SKILL.md playbook for Antigravity & Claude Code (--local supported).

agent-vault mcp

Start 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.

Google Geminigemini-2.0-flash
GEMINI_API_KEY
Groqllama-3.3-70b-versatile
GROQ_API_KEY
OpenAIgpt-4o-mini
OPENAI_API_KEY
Anthropicclaude-3-5-haiku-latest
ANTHROPIC_API_KEY
DeepSeek / OpenRouterdeepseek-chat
DEEPSEEK_API_KEY
Local Ollama (Offline)Any local model
OLLAMA_HOST
Privacy & Compatibility

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.

Built by BaseWorks

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.

Explore BaseEngine