Memesh Llm Memory

MeMesh LLM Memory provides a lightweight, universal memory layer for AI, enabling persistent and searchable knowledge across sessions.

๐ŸŒ English | ็น้ซ”ไธญๆ–‡ | ็ฎ€ไฝ“ไธญๆ–‡ | ๆ—ฅๆœฌ่ชž | ํ•œ๊ตญ์–ด | Portuguรชs | Franรงais | Deutsch | Tiแบฟng Viแป‡t | Espaรฑol | เธ เธฒเธฉเธฒเน„เธ—เธข

<p align="center"> <h1 align="center">MeMesh LLM Memory</h1> <p align="center"> <strong>The lightest universal AI memory layer.</strong><br /> One SQLite file. Any LLM. Zero cloud. </p> <p align="center"> <a href="https://www.npmjs.com/package/@pcircle/memesh"><img src="https://img.shields.io/npm/v/@pcircle/memesh?style=flat-square&color=3b82f6&label=npm" alt="npm" /></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-22c55e?style=flat-square" alt="MIT" /></a> <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D20-22c55e?style=flat-square" alt="Node" /></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-a855f7?style=flat-square" alt="MCP" /></a> </p> </p>

The Problem

Your AI forgets everything between sessions. Every decision, every bug fix, every lesson learned โ€” gone. You re-explain the same context, Claude re-discovers the same patterns, and your team's AI knowledge resets to zero.

MeMesh gives every AI persistent, searchable, evolving memory.


Get Started in 60 Seconds

Step 1: Install

npm install -g @pcircle/memesh

Step 2: Your AI remembers

memesh remember --name "auth-decision" --type "decision" --obs "Use OAuth 2.0 with PKCE"

Step 3: Your AI recalls

memesh recall "login security"
# โ†’ Finds "OAuth 2.0 with PKCE" even though you searched different words

That's it. MeMesh is now remembering and recalling across sessions.

Open the dashboard to explore your memory:

memesh
<p align="center"> <img src="docs/images/dashboard-search.png" alt="MeMesh Search โ€” find any memory instantly" width="100%" /> </p> <p align="center"> <img src="docs/images/dashboard-analytics.png" alt="MeMesh Analytics โ€” health score, timeline, patterns, knowledge coverage" width="100%" /> </p> <p align="center"> <img src="docs/images/dashboard-graph.png" alt="MeMesh Graph โ€” interactive knowledge graph with type filters and ego mode" width="100%" /> </p>

Who Is This For?

If you are...MeMesh helps you...
A developer using Claude CodeRemember decisions, patterns, and lessons across sessions automatically
A team building with LLMsShare team knowledge via export/import, keep everyone's AI context aligned
An AI agent developerGive your agents persistent memory via MCP, HTTP API, or Python SDK
A power user with multiple AI toolsOne memory layer that works with Claude, GPT, LLaMA, Ollama, or any MCP client

Works With Everything

<table> <tr> <td width="33%" align="center">

Claude Code / Desktop

memesh-mcp

MCP protocol (auto-configured)

</td> <td width="33%" align="center">

Any HTTP Client

curl localhost:3737/v1/recall \
  -d '{"query":"auth"}'

memesh serve (REST API)

</td> <td width="33%" align="center">

Any LLM (OpenAI format)

memesh export-schema \
  --format openai

Paste tools into any API call

</td> </tr> </table>

Why Not Just Use Mem0 / Zep?

MeMeshMem0Zep
Install time5 seconds30-60 minutes30+ minutes
Setupnpm i -g โ€” doneNeo4j + VectorDB + API keysNeo4j + config
StorageSingle SQLite fileNeo4j + QdrantNeo4j
Works offlineYes, alwaysNoNo
DashboardBuilt-in (7 tabs + analytics)NoneNone
Dependencies620+10+
PriceFree foreverFree tier / PaidFree tier / Paid

MeMesh trades: enterprise-scale multi-tenant features for instant setup, zero infrastructure, and 100% privacy.


What Happens Automatically

You don't need to manually remember everything. MeMesh has 4 hooks that capture knowledge without you doing anything:

WhenWhat MeMesh does
Every session startLoads your most relevant memories + proactive warnings from past lessons
After every git commitRecords what you changed, with diff stats
When Claude stopsCaptures files edited, errors fixed, and auto-generates structured lessons from failures
Before context compactionSaves knowledge before it's lost to context limits

Opt out anytime: export MEMESH_AUTO_CAPTURE=false


Dashboard

7 tabs, 11 languages, zero external dependencies. Access at http://localhost:3737/dashboard when the server is running.

TabWhat you see
SearchFull-text + vector similarity search across all memories
BrowsePaginated list of all entities with archive/restore
AnalyticsMemory Health Score (0-100), 30-day timeline, value metrics, knowledge coverage, cleanup suggestions, your work patterns
GraphInteractive force-directed knowledge graph with type filters, search, ego mode, recency heatmap
LessonsStructured lessons from past failures (error, root cause, fix, prevention)
ManageArchive and restore entities
SettingsLLM provider config, language selector

Smart Features

๐Ÿง  Smart Search โ€” Search "login security" and find memories about "OAuth PKCE". MeMesh expands queries with related terms using your configured LLM.

๐Ÿ“Š Scored Ranking โ€” Results ranked by relevance (35%) + how recently you used it (25%) + how often (20%) + confidence (15%) + whether the info is still current (5%).

๐Ÿ”„ Knowledge Evolution โ€” Decisions change. forget archives old memories (never deletes). supersedes relations link old โ†’ new. Your AI always sees the latest version.

โš ๏ธ Conflict Detection โ€” If you have two memories that contradict each other, MeMesh warns you.

๐Ÿ“ฆ Team Sharing โ€” memesh export > team-knowledge.json โ†’ share with your team โ†’ memesh import team-knowledge.json


Real-World Usage

"MeMesh remembered that we chose PKCE over implicit flow three weeks ago. When I asked Claude about auth again, it already knew โ€” no re-explaining needed." โ€” Solo developer, building a SaaS

"We export our team's memory every Friday and import it Monday. Everyone's Claude starts the week knowing what the team learned last week." โ€” 3-person startup, shared knowledge base

"The dashboard showed me that 90% of my memories were auto-generated session logs. I started using remember deliberately for architecture decisions. Game changer." โ€” Developer who discovered the Analytics tab


Unlock Smart Mode (Optional)

MeMesh works fully offline out of the box. Add an LLM API key to unlock smarter search:

memesh config set llm.provider anthropic
memesh config set llm.api-key sk-ant-...

Or use the dashboard Settings tab (visual setup):

memesh  # opens dashboard โ†’ Settings tab
Level 0 (default)Level 1 (Smart Mode)
SearchFTS5 keyword matching+ LLM query expansion (~97% recall)
Auto-captureRule-based patterns+ LLM extracts decisions & lessons
CompressionNot availableconsolidate compresses verbose memories
CostFree, no API key~$0.0001 per search (Haiku)

All 8 Memory Tools

ToolWhat it does
rememberStore knowledge with observations, relations, and tags
recallSmart search with multi-factor scoring and LLM query expansion
forgetSoft-archive (never deletes) or remove specific observations
consolidateLLM-powered compression of verbose memories
exportShare memories as JSON between projects or team members
importImport memories with merge strategies (skip / overwrite / append)
learnRecord structured lessons from mistakes (error, root cause, fix, prevention)
user_patternsAnalyze your work patterns โ€” schedule, tools, strengths, learning areas

Architecture

                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   Core Engine   โ”‚
                    โ”‚  (8 operations) โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
           โ”‚                 โ”‚                 โ”‚
     CLI (memesh)    HTTP API (serve)    MCP (memesh-mcp)
           โ”‚                 โ”‚                 โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚
                    SQLite + FTS5 + sqlite-vec
                    (~/.memesh/knowledge-graph.db)

Core is framework-agnostic. Same logic runs from terminal, HTTP, or MCP.


Contributing

git clone https://github.com/PCIRCLE-AI/memesh-llm-memory
cd memesh-llm-memory && npm install && npm run build
npm test -- --run    # 413 tests

Dashboard: cd dashboard && npm install && npm run dev


<p align="center"> <strong>MIT</strong> โ€” Made by <a href="https://pcircle.ai">PCIRCLE AI</a> </p>