vibe-memory
Provides long-term memory and codebase AST intelligence for AI coding agents, enabling persistent context handoff and high-efficiency symbol queries.
README
<div align="center">
π§ Vibe Memory (v2.5)
Universal Long-Term Memory & Codebase AST Intelligence Protocol for AI Coding Agents
<br />
The persistent brain for Vibe Coders and AI Agents.
Quit Claude Code mid-task, switch to Antigravity or Cursor in the same workspace, cut LLM token consumption by 97%, and continue building without re-explaining architectures, design tokens, or past bug discoveries.
</div>
π Table of Contents
- β‘ 60-Second Quickstart Guide
- π₯ Who Is Vibe Memory For?
- π‘ The 4 Core Superpowers & Bottlenecks Solved
- π οΈ Complete CLI Command Reference
- π Model Context Protocol (MCP) Setup for 5 Major IDEs
- πΈοΈ GraphRAG Hierarchical Community Mapping
- π§ Mem0 Adaptive Learning Engine
- π Cross-Agent Handoff Workflow
- π Token Savings & ROI Benchmark
- π Credits & Ecosystem References
- π€ Part of The Vibe Coder's Power Suite
- π€ Author & License
β‘ 60-Second Quickstart Guide
Get persistent memory and AST intelligence running in any existing or new repository with a single command:
# 1. Initialize AGENT_MEMORY.md with smart semantic tags
npx vibe-memory init
# 2. Teach the AI a rule or bug fix using Mem0 Adaptive Learning
npx vibe-memory learn "Always use 420Hz spring physics for button clicks"
npx vibe-memory learn "Fixed Next.js 15 async headers() bug in auth middleware"
# 3. Generate a GraphRAG component community map
npx vibe-memory graph
# 4. Instant AST Symbol lookup across codebase (97% token savings)
npx vibe-memory ast
# 5. Start the Model Context Protocol (MCP) stdio server
npx vibe-memory mcp
π₯ Who Is Vibe Memory For?
- Vibe Coders & Solo Founders: Rapidly building SaaS and web apps using natural language without losing architectural state when chat sessions get long or reset.
- Full-Stack Software Engineers: Moving between terminal CLIs (Claude Code), editor environments (Cursor), and autonomous planners (Antigravity).
- Multi-Agent Engineering Teams: Coordinating multi-agent workflows where agents need shared, structured access to code contracts and past bug fixes.
π‘ The 4 Core Superpowers & Bottlenecks Solved
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HOW VIBE MEMORY TRANSFORMS CODING β
βββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββ΄ββββββββββββββββ¬βββββββββββββββββββββββββββββ
βΌ βΌ βΌ βΌ
βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ
β 1. ZERO AMNESIA β β 2. 97% TOKEN SAVE β β 3. MULTI-TOOL β β 4. SELF-LEARNING β
β ON CHAT RESETS β β & 15X SPEEDUP β β SYNC HANDOFFS β β BUG MEMORY β
βββββββββββββββββββββ€ βββββββββββββββββββββ€ βββββββββββββββββββββ€ βββββββββββββββββββββ€
β The AI never β β Instead of readingβ β Plan in β β Mem0-powered β
β forgets your ADR, β β 50 full files, ASTβ β Antigravity β β β engine saves past β
β design tokens, or β β indexes export β β Code in Cursor β β β bug fixes so the β
β DB schemas. β β symbols in <100 tok. β Test in Claude β β AI never repeats β
β β β β β without restarts. β β the same mistake. β
βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ
| Superpower | The Problem Without Vibe Memory | How Vibe Memory Solves It |
|---|---|---|
| 1. Zero Amnesia | Context window resets erase agreed-upon DB schemas, styling rules, and state patterns. | AGENT_MEMORY.md provides a permanent, version-controlled project memory every agent reads automatically. |
| 2. 97% Token Savings | Asking an AI to inspect auth flow burns 15,000β50,000 tokens reading 50 full files. | AST Progressive Disclosure extracts exact function signatures and type contracts in <100 tokens (0.4s response). |
| 3. Multi-Tool Handoffs | Switching from Antigravity to Cursor requires re-prompting and copy-pasting code context. | 1-click structured handoff checkpoints let any tool resume the active milestone instantly. |
| 4. Self-Learning Bug Memory | AI agents repeatedly make the same SSR hydration or auth cookie mistakes. | Mem0 adaptive learning logs the fix pattern so agents never repeat past mistakes. |
π οΈ Complete CLI Command Reference
| Command | Usage Example | Action Performed |
|---|---|---|
init |
npx vibe-memory init |
Initializes AGENT_MEMORY.md pre-configured with 4 persistent quadrants and semantic tags. |
learn |
npx vibe-memory learn "<text>" |
Mem0 Engine: Parses freeform text and auto-categorizes into Architecture, Bug, or Preference. |
graph |
npx vibe-memory graph |
GraphRAG Engine: Maps components, hooks, API services, types, and external package dependencies. |
search |
npx vibe-memory search auth |
Instant filter querying AGENT_MEMORY.md for specific #tags or keywords. |
add |
npx vibe-memory add arch "text" "[#tags]" |
Manually appends a new decision, bug discovery, or user preference. |
ast |
npx vibe-memory ast [query] |
Scans workspace and extracts exported function signatures, interfaces, and types (97% token savings). |
mcp |
npx vibe-memory mcp |
Starts the native JSON-RPC 2.0 stdio Model Context Protocol server for AI IDEs. |
π Model Context Protocol (MCP) Setup for 5 Major IDEs
Equip your favorite AI editor with automated memory recall, adaptive learning, and AST symbol lookups over native stdio JSON-RPC:
1. πΉ Antigravity (~/.gemini/antigravity/mcp-config.json):
{
"mcpServers": {
"vibe-memory": {
"command": "npx",
"args": ["-y", "vibe-memory", "mcp"]
}
}
}
2. πΉ Cursor (.cursor/mcp.json):
{
"mcpServers": {
"vibe-memory": {
"command": "npx",
"args": ["-y", "vibe-memory", "mcp"]
}
}
}
3. πΉ Claude Code (~/.claude.json):
{
"mcpServers": {
"vibe-memory": {
"command": "npx",
"args": ["-y", "vibe-memory", "mcp"]
}
}
}
4. πΉ Windsurf (~/.codeium/windsurf/mcp_config.json):
{
"mcpServers": {
"vibe-memory": {
"command": "npx",
"args": ["-y", "vibe-memory", "mcp"]
}
}
}
5. πΉ Roo Code / Cline (roo_mcp_settings.json):
{
"mcpServers": {
"vibe-memory": {
"command": "npx",
"args": ["-y", "vibe-memory", "mcp"]
}
}
}
π οΈ Native MCP Tools Included:
| MCP Tool Name | Parameters | Description |
|---|---|---|
get_project_memory |
{ tag?: string } |
Retrieves project ADRs, bug fixes, and user preferences from AGENT_MEMORY.md with optional tag filtering. |
learn_adaptive_memory |
{ observation: string } |
Mem0-inspired: Automatically parses a freeform text or bug pattern and stores it into AGENT_MEMORY.md. |
get_graphrag_communities |
{} |
GraphRAG-inspired: Returns hierarchical module communities (components, hooks, API services, types, and external dependencies). |
query_ast_symbols |
{ query?: string } |
Scans workspace and returns exported functions, interfaces, and classes in <100 tokens (97% savings). |
πΈοΈ GraphRAG Hierarchical Community Mapping
When an AI agent makes architectural changes, it needs to understand system-wide impact radius. Running npx vibe-memory graph categorizes your codebase into interconnected community tiers:
π¦ Component Community (UI & Views)
βββ src/App.tsx
βββ src/components/MemoryGraph.tsx
βββ src/components/CodebaseGraph.tsx
β‘ Hooks & State Community (Stores & React Hooks)
βββ src/hooks/useMemoryStore.ts
βββ src/stores/cartStore.ts
π API & Data Services (Backend & Database)
βββ src/lib/supabaseClient.ts
βββ src/services/priceApi.ts
π‘οΈ Types & Schemas (TypeScript Contracts)
βββ src/types/memory.ts
π External Package Dependencies
βββ [ react, framer-motion, lucide-react, sonner, tailwindcss ]
π§ Mem0 Adaptive Learning Engine
Rather than requiring manual markdown maintenance, the Mem0-inspired Adaptive Learner extracts structured patterns from natural language:
# Input
npx vibe-memory learn "Fixed Next.js SSR hydration mismatch by moving theme detection to useEffect"
# Output in AGENT_MEMORY.md
* **[2026-08-17] [ #bug #fix #adaptive ]** Fixed Next.js SSR hydration mismatch by moving theme detection to useEffect
π Cross-Agent Handoff Workflow
When switching between tools mid-task:
- Tell your active agent: "Create handoff snapshot for Cursor."
- The agent appends a structured checkpoint to
AGENT_MEMORY.md:
<!-- AGENT_HANDOFF_SNAPSHOT: ANTIGRAVITY β CURSOR -->
# π Context Handoff (2026-08-17T22:30:00Z)
## π― Active Objective
Finalizing the real-time fleet telemetry map and vehicle status filter.
## β
Accomplished So Far
- Configured Leaflet container and Tailwind design tokens
- Built GPS ingestion pipeline in TypeScript
- Verified Adelaide CBD and Barossa Valley route corridors
## π Immediate Next Actions for Cursor
- Connect the live incident marker overlay in src/components/CorridorMap.tsx
- Run unit test suite
<!-- END_AGENT_HANDOFF -->
- Open Cursor, type
"Continue active task", and Cursor resumes the exact next step without missing a beat!
π Token Savings & ROI Benchmark
| Approach | Tokens Consumed | Response Latency | Cost / Risk |
|---|---|---|---|
| Raw File Reading (50 files) | ~15,000 β 50,000 tokens | 6.5s β 12.0s | High cost, context bloat, hallucinations |
| Vibe Memory AST Index | ~85 β 150 tokens | 0.4s | 97% savings, instant focus, zero amnesia |
π Credits & Ecosystem References
We gratefully acknowledge the open-source projects whose groundbreaking architectures inspired and shaped vibe-memory:
| Project | Author / Team | Stars | Repository & Attribution |
|---|---|---|---|
Mem0 |
Mem0 Team | 28.2k+ β | mem0ai/mem0 Β· Adaptive episodic memory extraction and self-updating user preference learning. |
GraphRAG |
Microsoft Research | 23.4k+ β | microsoft/graphrag Β· Hierarchical community graph mapping and dependency impact analysis. |
Tree-sitter |
Tree-sitter Contributors | 20.1k+ β | tree-sitter/tree-sitter Β· Incremental AST grammar parsing and sub-millisecond symbol extraction. |
Model Context Protocol |
Anthropic | 141.0k+ β | modelcontextprotocol.io Β· Open JSON-RPC 2.0 stdio tool integration standard. |
π€ Part of The Vibe Coder's Power Suite
- πͺ
vibe-superkit: Anti-AI Slop & Stripe/Tailwind UI Design Engine (Live Demo) - π§
vibe-memory: Universal Long-Term Memory & Codebase AST Intelligence (Live Demo) - β‘
vibe-skills: Mega-Library of 50 Standard Agent Skills with 1-Command CLI (npx vibe-skills add <skill>) - π€
vibe-agency: Autonomous Multi-Agent Team Orchestrator with 200+ Agents & Vibe Kanban (Live Demo)
π€ Author
Created with intention by Yogeshkumar Patel β’ Adelaide, Australia π¦πΊ
- LinkedIn: https://www.linkedin.com/in/yogeshkumar-ai/
- GitHub: @shahrukh-hack
π License
MIT License Β© 2026 Yogeshkumar Patel
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.