Claude figured it out. Ollama forgot it. MemoryMesh fixes that.
One shared memory for all your AI tools. Local. Private. Zero cloud. Works in 60 seconds.
pip install memorymeshYou spend 5 minutes explaining your stack, your preferences, your project context to Claude. It gets it. Then you switch to Ollama for a quick local task — and it knows nothing. You switch to GPT for a second opinion — nothing. Every tool starts from zero. Every single time.
import memorymesh as mm
mm.remember("user builds in FastAPI + PostgreSQL, hates ORMs")
mm.recall("tech stack")from memorymesh.connectors.claude import ClaudeWithMemory
from memorymesh.connectors.ollama import OllamaWithMemory
# Claude saves context
claude = ClaudeWithMemory()
claude.remember("Backend is FastAPI, DB is PostgreSQL, no ORMs")
response = claude.chat("How should I structure the billing module?")
# Ollama reads the SAME memory — zero setup
# Requires: ollama serve && ollama pull llama3.2
ollama = OllamaWithMemory(model="llama3.2")
response = ollama.chat("Help me with the billing queries")
# Ollama already knows: FastAPI, PostgreSQL, no ORMsfrom memorymesh.connectors.openai import OpenAIWithMemory
gpt = OpenAIWithMemory()
response = gpt.chat("Review my database schema")
# Same shared memory as Claude and OllamaAdd to your Claude Code MCP settings:
{
"mcpServers": {
"memorymesh": {
"command": "memorymesh",
"args": ["serve"]
}
}
}Claude gets 5 tools:
remember_memory— store a memoryrecall_memory— search memoriesget_context— get formatted context stringforget_memory— delete a memorymemory_stats— show statistics
pip install memorymesh
memorymesh servev0.1 as_context() returns everything matching the query.
Over time, this causes context bloat.
v0.2 adds smart_context() which prunes, decays, and filters:
# Instead of:
ctx = mm.as_context("current project")
# Use:
ctx = mm.smart_context("current project")
# Automatically removes old/irrelevant memories
# Keeps your prompts clean as memory grows
# Configure:
ctx = mm.smart_context(
"current project",
min_relevance=0.3, # filter below 30% relevance
ttl_days=30, # forget after 30 days
)memorymesh remember "user prefers dark mode"
memorymesh recall "preferences"
memorymesh smart-recall "preferences" # relevance-filtered
memorymesh prune # remove expired memories
memorymesh decay # apply importance decay
memorymesh list
memorymesh stats
memorymesh serve- Data stays at
~/.memorymesh/memory.db— plain SQLite - No API keys for core functionality
- Works offline
- Open the DB with any SQLite viewer — it is yours forever
- Relevance scoring is keyword-based, not semantic (semantic search with embeddings planned for v0.3)
- TTL is based on creation date, not last meaningful use
- Decay requires manual call or
auto_prune=True - FTS5 is keyword search, not semantic —
recall("FastAPI")works,recall("what framework?")does not - No sync across machines (by design — your data stays on your machine)
- Ollama connector requires
ollama serverunning locally
- Core: remember / recall / as_context
- Connectors: Claude / Ollama / OpenAI
- MCP server (Claude Code integration)
- CLI
- Semantic search with local embeddings
- Auto-learn from conversation history
- LangChain / LlamaIndex connectors