Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By baladithyab
Persistent, hierarchical, self-evolving memory for Claude Code powered by SurrealDB
npx claudepluginhub baladithyab/engramRemove a memory from SurrealDB. Soft-deletes by marking as forgotten.
View or update the current SurrealDB memory configuration without the full setup wizard.
Interactive setup wizard for the SurrealDB memory system. Auto-detects environment, configures deployment mode, and verifies connectivity.
Show the status of the SurrealDB memory system — connection, counts, and configuration.
Search and retrieve memories from SurrealDB. Find past knowledge, decisions, and patterns.
This skill should be used when the user asks to "manage memory", "consolidate memories", "promote memories", "archive old memories", "check memory health", "prune knowledge graph", "switch deployment mode", "export memory", or needs guidance on memory lifecycle management. Covers: consolidation pipeline, promotion criteria, archival, knowledge graph maintenance, deployment mode switching, memory diagnostics, and troubleshooting.
This skill should be used when the user asks to "search memories", "find in memory", "what do I remember about X", "recall past decisions", "check memory for X", or needs guidance on constructing memory queries. Covers: MCP tool usage patterns, memory type selection (episodic/semantic/procedural/working), scope selection (session/project/user), importance scoring, and retrieval strategies (BM25, graph, hybrid).
Use this skill when you need to write SurrealQL queries or schema definitions. Triggers on: "SurrealQL", "SurrealDB query", "surql", "DEFINE", "SELECT FROM", "CREATE TABLE", "RELATE", "full-text search", "vector search", "HNSW", "graph traversal", "computed field", "memory strength decay", "knowledge graph", "edge queries", "record link", "UPSERT", "BM25", "search operator", "@1@", "SPLIT", "FETCH". Use this skill to understand exact SurrealQL syntax for the surrealdb-memory plugin.
This skill should be used when writing SurrealQL queries for SurrealDB 3.0, modifying the engram schema, or debugging SurrealQL errors. Triggers on: "SurrealQL", "surql", "SurrealDB query", "schema change", "DEFINE TABLE", "DEFINE FIELD", "DEFINE INDEX", "UPSERT", "RELATE", or any SurrealDB DDL.
Admin access level
Server config contains admin-level keywords
Uses power tools
Uses Bash, Write, or Edit tools
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Persistent memory for AI coding agents. Survives across sessions and compactions.
Universal memory runtime — cross-session cognitive memory for Claude Code. Remembers decisions, patterns, and context across coding sessions.
Persistent memory for Claude Code. Capture work across sessions and recall relevant context.
Persistent memory for Claude Code — memories survive across sessions, projects, and machines
Give your AI a memory — mine projects and conversations into a searchable palace. 19 MCP tools, auto-save hooks, and guided setup.
Persistent semantic memory for Claude Code — auto-injects relevant context at session start, captures git commits, test results, and research via hooks, and provides 30+ MCP tools for memory management.
Persistent, hierarchical, self-evolving memory for Claude Code, powered by SurrealDB.
Every Claude Code session starts from scratch. CLAUDE.md helps, but it's static and hand-maintained. This plugin gives Claude actual memory — it learns from your sessions, remembers across projects, and gets smarter over time.
What makes this different from other memory plugins:
Most memory systems (Mem0, Zep, etc.) bolt together 3-4 databases — Postgres for structure, Neo4j for graphs, Qdrant for vectors, Redis for cache. This plugin uses a single SurrealDB instance that natively handles all four: documents, graphs, vectors (HNSW), and full-text search (BM25) in one query language.
# Clone
git clone https://github.com/baladithyab/engram.git
cd engram
# Install MCP server dependencies
cd mcp && bun install && cd ..
# Load the plugin in Claude Code
claude --plugin-dir /path/to/engram
That's it. The plugin auto-configures on first run:
.claude/engram.local.md with default settings~/.claude/engram/data/┌─────────────────────────────────────────────────┐
│ User Memory (u_{hash}) │
│ Cross-project: preferences, patterns, expertise │
│ Half-life: 30 days (procedural) │
├─────────────────────────────────────────────────┤
│ Project Memory (p_{hash}) │
│ Per-codebase: architecture, conventions, errors │
│ Half-life: 7 days (semantic) │
├─────────────────────────────────────────────────┤
│ Session Memory (s_{session_id}) │
│ Current conversation: working memory, scratch │
│ Half-life: 1 hour (working) │
└─────────────────────────────────────────────────┘
Each scope lives in its own SurrealDB database. Memories promote upward based on importance and access frequency.
You don't have to do anything — hooks handle memory automatically:
| When | What Happens |
|---|---|
| Session starts | Claude gets briefed on available memory tools and hierarchy |
| You write/edit files | File changes logged to memory |
| A command fails | Error context stored for future debugging |
| Subagents spawn | They get briefed with relevant project memory |
| Subagents finish | Their discoveries are captured |
| Context gets compacted | Critical state saved before compaction |
| Session ends | Learnings consolidated, valuable memories promoted to project scope |
| Command | What It Does |
|---|---|
/remember <text> | Store a memory (interactive type/scope selection) |
/recall <query> | Search across all memory scopes |
/forget <query> | Soft-delete a memory |
/memory-status | Show connection, counts, config |
/memory-setup | Interactive configuration wizard |
/memory-config | Quick config view/edit |
Claude uses these tools directly (auto-approved, no permission prompts):
| Tool | Purpose |
|---|---|
store_memory | Create a memory with content, type, scope, tags |
recall_memories | Cross-scope search (session 1.5x, project 1.0x, user 0.7x) |
search_knowledge_graph | Traverse entity relationships |
reflect_and_consolidate | Promote, archive, deduplicate |
promote_memory | Move memory to a higher scope |
update_memory | Update existing memory |
tag_memory | Add tags to a memory |
forget_memory | Soft-delete |
get_memory_status | Connection and count stats |
| Mode | Command | Best For |
|---|---|---|
| Embedded (default) | surrealkv://~/.claude/... | Individual use, zero config |
| In-Memory | mem:// | Testing, CI (snapshots on close) |
| Local Server | ws://localhost:8000 | Shared dev, Surrealist GUI |
| Remote | wss://cloud.surrealdb.com | Teams, multi-machine |
Configure via /memory-setup, .env file, or .claude/engram.local.md.
Built on the MemEvolve EURM framework:
store_memory routes to the correct scope databaserecall_memories searches all scopes with weighted priorityreflect_and_consolidate handles promotion, decay, and archivalMemory strength decays exponentially (working: 1hr, episodic: 1d, semantic: 7d, procedural: 30d), with access-based reinforcement extending the half-life by 20% per recall.