vibe-memory

vibe-memory

Provides long-term memory and codebase AST intelligence for AI coding agents, enabling persistent context handoff and high-efficiency symbol queries.

Category
Visit Server

README

<div align="center">

🧠 Vibe Memory (v2.5)

Universal Long-Term Memory & Codebase AST Intelligence Protocol for AI Coding Agents

Author Version License MCP Protocol Mem0 Adaptive GraphRAG Token Reduction Live Visualizer

<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

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?

  1. Vibe Coders & Solo Founders: Rapidly building SaaS and web apps using natural language without losing architectural state when chat sessions get long or reset.
  2. Full-Stack Software Engineers: Moving between terminal CLIs (Claude Code), editor environments (Cursor), and autonomous planners (Antigravity).
  3. 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:

  1. Tell your active agent: "Create handoff snapshot for Cursor."
  2. 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 -->
  1. 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

  1. πŸͺ„ vibe-superkit: Anti-AI Slop & Stripe/Tailwind UI Design Engine (Live Demo)
  2. 🧠 vibe-memory: Universal Long-Term Memory & Codebase AST Intelligence (Live Demo)
  3. ⚑ vibe-skills: Mega-Library of 50 Standard Agent Skills with 1-Command CLI (npx vibe-skills add <skill>)
  4. πŸ€– vibe-agency: Autonomous Multi-Agent Team Orchestrator with 200+ Agents & Vibe Kanban (Live Demo)

πŸ‘€ Author

Created with intention by Yogeshkumar Patel β€’ Adelaide, Australia πŸ‡¦πŸ‡Ί


πŸ“„ License

MIT License Β© 2026 Yogeshkumar Patel

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured