memora
Give your AI agents persistent, collective memory — with deduplicating absorb, supersession lineage, semantic search, and a graph UI. Speaks MCP.
Install / Use
claude mcp add agentic-box -- npx -y github:agentic-box/memoraIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Skill content
View source on GitHubFeatures
Core Storage
- 💾 Persistent Storage - SQLite with optional cloud sync (S3, R2, D1)
- 📂 Hierarchical Organization - Section/subsection structure with auto-hierarchy assignment
- 📦 Export/Import - Backup and restore with merge strategies
Search & Intelligence
- 🔍 Semantic Search - Vector embeddings (TF-IDF, sentence-transformers, OpenAI)
- 🎯 Advanced Queries - Full-text, date ranges, tag filters (AND/OR/NOT), hybrid search
- 🔀 Cross-references - Auto-linked related memories based on similarity
- 🤖 LLM Deduplication - Find and merge duplicates with AI-powered comparison
- 🔗 Memory Linking - Typed edges, importance boosting, and cluster detection
Document Storage
- 📄 Structured Documents - Store markdown documents as searchable fragment trees (claims, plan items, references, risks)
- 🔒 Fragment Integrity - Guards against accidental delete/merge/absorb of document fragments
- 🔍 Granular Search - Individual claims and findings are semantically searchable while the full document remains retrievable as a unit
Tools & Visualization
- ⚡ Memory Automation - Structured tools for TODOs, issues, and sections
- 🕸️ Knowledge Graph - Interactive visualization with Mermaid rendering and cluster overlays
- 🌐 Live Graph Server - Built-in HTTP server with cloud-hosted option (D1/Pages)
- 💬 Chat with Memories - RAG-powered chat panel with LLM tool calling to search, create, update, and delete memories via streaming chat
- 📡 Event Notifications - Poll-based system for inter-agent communication
- 📊 Statistics & Analytics - Tag usage, trends, and connection insights
- 🧠 Memory Insights - Activity summary, stale detection, consolidation suggestions, and LLM-powered pattern analysis
- 📜 Action History - Track all memory operations (create, update, delete, merge, boost, link) with grouped timeline view
Preview
<p align="center"> <img src="media/demo.gif" alt="Memora memory graph demo" width="320"> <img src="media/demo2.gif" alt="Memora memory interaction demo" width="320"> </p>Install
pip install git+https://github.com/agentic-box/memora.git
Includes cloud storage (S3/R2) and OpenAI embeddings out of the box.
# Optional: local embeddings (offline, ~2GB for PyTorch)
pip install "memora[local]" @ git+https://github.com/agentic-box/memora.git
<details id="usage">
<summary><big><big><strong>Usage</strong></big></big></summary>
The server runs automatically when configured in Claude Code. Manual invocation:
# Default (stdio mode for MCP)
memora-server
# With graph visualization server
memora-server --graph-port 8765
# HTTP transport (alternative to stdio)
memora-server --transport streamable-http --host 127.0.0.1 --port 8080
</details>
<details id="configuration">
<summary><big><big><strong>Configuration</strong></big></big></summary>
Claude Code
Add to .mcp.json in your project root:
Local DB:
{
"mcpServers": {
"memora": {
"command": "memora-server",
"args": [],
"env": {
"MEMORA_DB_PATH": "~/.local/share/memora/memories.db",
"MEMORA_ALLOW_ANY_TAG": "1",
"MEMORA_GRAPH_PORT": "8765"
}
}
}
}
Cloud DB (Cloudflare D1) - Recommended:
{
"mcpServers": {
"memora": {
"command": "memora-server",
"args": ["--no-graph"],
"env": {
"MEMORA_STORAGE_URI": "d1://<account-id>/<database-id>",
"CLOUDFLARE_API_TOKEN": "<your-api-token>",
"MEMORA_ALLOW_ANY_TAG": "1"
}
}
}
}
With D1, use --no-graph to disable the local visualization server. Instead, use the hosted graph at your Cloudflare Pages URL (see Cloud Graph).
Cloud DB (S3/R2) - Sync mode:
{
"mcpServers": {
"memora": {
"command": "memora-server",
"args": [],
"env": {
"AWS_PROFILE": "memora",
"AWS_ENDPOINT_URL": "https://<account-id>.r2.cloudflarestorage.com",
"MEMORA_STORAGE_URI": "s3://memories/memories.db",
"MEMORA_CLOUD_ENCRYPT": "true",
"MEMORA_ALLOW_ANY_TAG": "1",
"MEMORA_GRAPH_PORT": "8765"
}
}
}
}
Codex CLI
Add to ~/.codex/config.toml:
[mcp_servers.memora]
command = "memora-server" # or full path: /path/to/bin/memora-server
args = ["--no-graph"]
env = {
AWS_PROFILE = "memora",
AWS_ENDPOINT_URL = "https://<account-id>.r2.cloudflarestorage.com",
MEMORA_STORAGE_URI = "s3://memories/memories.db",
MEMORA_CLOUD_ENCRYPT = "true",
MEMORA_ALLOW_ANY_TAG = "1",
}
</details>
<details id="environment-variables">
<summary><big><big><strong>Environment Variables</strong></big></big></summary>
| Variable | Description |
|------------------------|-----------------------------------------------------------------------------|
| MEMORA_DB_PATH | Local SQLite database path (default: ~/.local/share/memora/memories.db) |
| MEMORA_STORAGE_URI | Storage URI: d1://<account>/<db-id> (D1) or s3://bucket/memories.db (S3/R2) |
| CLOUDFLARE_API_TOKEN | API token for D1 database access (required for d1:// URI) |
| MEMORA_CLOUD_ENCRYPT | Encrypt database before uploading to cloud (true/false) |
| MEMORA_CLOUD_COMPRESS| Compress database before uploading to cloud (true/false) |
| MEMORA_CACHE_DIR | Local cache directory for cloud-synced database |
| MEMORA_ALLOW_ANY_TAG | Allow any tag without validation against allowlist (1 to enable) |
| MEMORA_TAG_FILE | Path to file containing allowed tags (one per line) |
| MEMORA_TAGS | Comma-separated list of allowed tags |
| MEMORA_GRAPH_PORT | Port for the knowledge graph visualization server (default: 8765) |
| MEMORA_EMBEDDING_MODEL | Embedding backend: openai (default), sentence-transformers, or tfidf |
| SENTENCE_TRANSFORMERS_MODEL | Model for sentence-transformers (default: all-MiniLM-L6-v2) |
| OPENAI_API_KEY | API key for OpenAI embeddings and LLM deduplication |
| OPENAI_BASE_URL | Base URL for OpenAI-compatible APIs (OpenRouter, Azure, etc.) |
| OPENAI_EMBEDDING_MODEL | OpenAI embedding model (default: text-embedding-3-small) |
| MEMORA_LLM_ENABLED | Enable LLM-powered deduplication comparison (true/false, default: true) |
| MEMORA_LLM_MODEL | Model for deduplication comparison (default: gpt-4o-mini) |
| CHAT_MODEL | Model for the chat panel (default: deepseek/deepseek-chat, falls back to MEMORA_LLM_MODEL) |
| AWS_PROFILE | AWS credentials profile from ~/.aws/credentials (useful for R2) |
| AWS_ENDPOINT_URL | S3-compatible endpoint for R2/MinIO |
| R2_PUBLIC_DOMAIN | Public domain for R2 image URLs |
Memora supports three embedding backends:
| Backend | Install | Quality | Speed |
|---------|---------|---------|-------|
| openai (default) | Included | High quality | API latency |
| sentence-transformers | pip install memora[local] | Good, runs offline | Medium |
| tfidf | Included | Basic keyword matching | Fast |
Automatic: Embeddings and cross-references are computed automatically when you memory_create, memory_update, or memory_create_batch.
Manual rebuild required when:
- Changing
MEMORA_EMBEDDING_MODELafter memories exist - Switching to a different sentence-transformers model
# After changing embedding model, rebuild all embeddings
memory_rebuild_embeddings
# Then rebuild cross-references to update the knowledge graph
memory_rebuild_crossrefs
</details>
<details id="live-graph-server">
<summary><big><big><strong>Live Graph Server</strong></big></big></summary>
A built-in HTTP server starts automatically with the MCP server, serving an interactive knowledge graph visualization.
<table> <tr> <td align="center"><img src="media/ui_details.png" alt="Details Panel" width="400"><br><em>Details Panel</em></td> <td align="center"><img src="media/ui_timeline.png" alt="Timeline Panel" width="400"><br><em>Timeline Panel</em></td> </tr> </table>Access locally:
http://localhost:8765/graph
Remote access via SSH:
ssh -L 8765:localhost:8765 user@remote
# Then open http://localhost:8765/graph in your browser
Configuration:
{
"env": {
"MEMORA_GRAPH_PORT": "8765"
}
}
To disable: add "--no-graph" to args in your MCP config.
Graph UI Features
- Details Panel - View memory content, metadata, tags, and related memories
- Timeline Panel - Browse memories chronologically, click to highlight in graph
- History Panel - Action log of all operations with grouped consecutive entries and clickable memory references (deleted memories shown as strikethrough)
- Chat Panel - Ask questions about your memories using RAG-powered LLM chat with streaming responses and clickable
[Memory #ID]references - Time Slider - Filter memories by date range, drag to explore history
- Real-time Updates - Graph, timeline, and history update via SSE when memories change
- Filters - Tag/section dropdowns, zoom controls
- Mermaid Rendering - Code blocks render as diagrams
Node Colors
- 🟣 Tags - Purple shades by tag
- 🔴 Issues - Red (open), Orange (in progress), Green (resolved), Gray (won't fix)
- 🔵 TODOs - Blue (open), Orange (in progress), Green (completed), Red (blocked)
Node size reflects connection count.
</details> <details id="cloud-graph"> <summary><big><big><strong>Cloud Graph (Recommended for D1)</strong></big></big></summary>Truncated for display — read the full file on GitHub.
Related Skills
caveman
107.1k🪨 why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
claude-mem
94.4kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
84.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
83.5kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
