Give your AI agents persistent memory in 5 lines of Python. Zero config. Self-hosted. Open source.
from engram import Memory mem = Memory() # Store a memory mem.store("User prefers dark mode", tags=["preference"], importance=8 ) # Search memories results = mem.search("dark mode") # Recall top memories context = mem.recall(limit=10)
The Problem
Every conversation starts from scratch. Every context is forgotten. Your AI agents process thousands of interactions — and remember none of them. They ask the same questions, make the same mistakes, lose the same insights. Memory isn't a feature. It's the foundation.
Try it live
Store a memory, search it, recall it. This is a real Engram instance running on our servers.
Features
Built for developers who value simplicity, privacy, and performance.
No databases to set up. No Docker containers to manage. No environment variables to configure. Install and go.
Store, search, and recall memories with an API so simple it fits in a tweet. No boilerplate. No ceremony.
First-class Model Context Protocol support. Connect to Claude, Cursor, or any MCP-compatible client out of the box.
Isolated namespaces per agent. Shared memory pools when you need them. Built for swarm architectures.
Self-hosted: your data stays on your machine. Cloud API: hosted on European servers (Germany). No telemetry. No third-party services. MIT licensed.
Importance scoring, automatic deduplication, full-text search, and semantic recall. Memories that matter surface first.
Real-time pub/sub channels for multi-agent communication. Connect your agents with alerts, commands, and data streams. Pro feature.
One API call. Engram auto-selects the most relevant memories for your prompt, ranked by relevance × importance, fitted to your token budget. No manual search needed.
Comparison
We built Engram because existing solutions were too complex for what should be simple.
| Feature | Engram | Mem0 | Letta | Zep |
|---|---|---|---|---|
| Setup | Zero-Config | Complex | Docker + PG | Cloud-only |
| Self-Hosted | Yes (trivial) | Yes (complex) | Yes (Docker) | Deprecated |
| Dependencies | None | Neo4j + Vector DB | PostgreSQL | Cloud-only |
| API Complexity | 5 lines | Medium | Complex | Medium |
| MCP Support | First-Class | Community | No | Yes |
| Agent Message Bus | Synapse (Pro) | No | No | No |
| Semantic Search | Pro | No | No | No |
| Auto Context Builder | Pro | No | No | No |
| Memory TTL / Expiry | Pro | No | No | No |
| Memory Links / Graph | Pro | No | No | No |
| Agent AutoSave | Pro | No | No | No |
| License | MIT | Apache 2.0 | Apache 2.0 | Cloud-only |
Pricing
Start free. Scale when you're ready. No credit card required.
Self-hosted is always unlimited. No memory limits, no feature gates, no cloud dependency.
Cloud API limits apply only to the hosted Pro version.
Pay securely via Stripe. Cancel anytime. Questions?
Examples
Copy, paste, run. That's it.
from engram import Memory # Initialize — that's it. No config needed. mem = Memory() # Store facts, preferences, decisions mem.store( content="User prefers dark mode and compact layout", tags=["preference", "ui"], importance=8 ) # Search with full-text search results = mem.search("dark mode") for r in results: print(r.content, r.importance) # Recall top memories for context injection context = mem.recall(limit=20, min_importance=7)
from engram import Memory # Each agent gets its own namespace researcher = Memory(namespace="researcher") analyst = Memory(namespace="analyst") writer = Memory(namespace="writer") # Memories are isolated by default researcher.store( "Found 3 papers on transformer architectures", tags=["finding", "ml"], importance=9 ) # But can be shared when needed shared = Memory(namespace="shared") shared.store( "Project deadline: March 15, 2026", tags=["project", "deadline"], importance=10 ) # All agents can access shared memory deadlines = shared.search("deadline")
{ "mcpServers": { "engram": { "command": "python3", "args": [ "-m", "mcp_server.server" ] } } } // That's it. Claude Code now has persistent memory. // Available tools: // - memory_store // - memory_search // - memory_recall // - memory_delete // - memory_stats
FAQ
Text-based memories — facts, preferences, decisions, error fixes, patterns. Each memory has content, tags, an importance score (1–10), and a type. Everything is stored in a local SQLite database on your machine. No images, no binaries — just the context your agents need.
No. Engram runs on SQLite with full-text search (FTS5) — it works on a Raspberry Pi. Memory recall is sub-millisecond for typical workloads. Optional semantic search with embeddings needs more resources, but the core runs anywhere Python runs.
Self-hosted: your data never leaves your machine. It's a single SQLite file on your disk — no telemetry, no third-party services. Cloud API (Pro): data is stored on European servers in Germany (Hetzner), never on AWS or Google. The entire codebase is MIT-licensed and open for audit.
Engram is the memory layer, not the agent runtime. Your agents run wherever you want — Claude Code, Cursor, custom scripts, LangChain, CrewAI. Engram just gives them persistent memory via a Python SDK, REST API, or MCP server. Think of it as a database your agents can remember with.
Instead of manually searching and assembling memories, the Smart Context Builder does it in one call. Give it a prompt and a token budget — it combines full-text search, semantic search, and priority recall, deduplicates and ranks results by relevance × importance, and returns a ready-to-use context string that fits your token budget. Perfect for injecting relevant memory into LLM prompts automatically.