By janbjorge
Manage rekal AI assistant memory by bootstrapping from codebase architecture, capturing session knowledge with deduplication, performing periodic cleanup, and preventing direct memory file edits via hooks.
Operational guide for rekal memory tools. Precise rules for when/how to call each tool, with exact parameters and decision trees. Use at session start, when onboarding to a rekal workspace, or when user asks "how do I use rekal", "what rekal tools", "help with memory". Trigger: /rekal-usage.
Periodic memory maintenance and cleanup. Finds duplicates, conflicts, stale conversations, and quality issues in the memory database. Proposes fixes for user approval — never auto-deletes or auto-modifies. Use when user says "clean up memories", "memory maintenance", "check memory health", or invokes /rekal-hygiene. Run monthly or when conflicts are piling up.
Bootstrap rekal memory for a project. Scans the codebase for architecture, conventions, dependencies, workflows, and config — then stores durable knowledge as properly typed, tagged, deduplicated memories. Use when starting rekal on a new project, or when user says "init rekal", "bootstrap memory", "populate rekal", "scan project". Trigger: /rekal-init.
End-of-session memory capture with deduplication. Extracts durable knowledge, checks for duplicates, stores or supersedes as appropriate. Use whenever a session wraps up, a task finishes, or the user says goodbye/thanks/done. Also use when significant preferences, decisions, or discoveries emerge mid-session. Make sure to trigger this skill proactively — err on the side of capturing.
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Long-term memory for LLMs. One SQLite file, no cloud, no API keys.
rekal is an MCP server that gives AI coding agents persistent memory across sessions. Memories are stored locally in SQLite and retrieved with hybrid search (BM25 keywords + vector semantics + recency decay). Nothing leaves your machine.
How it works · Quickstart · Install · Setup · Updating · Tools · Under the hood · Troubleshooting
Works with any MCP-capable agent: Claude Code, Codex CLI, OpenCode.
Session 1: "I prefer Ruff over Black" → memory_store(...)
Session 47: "Set up linting" → memory_search("formatting preferences")
← "User prefers Ruff over Black" (0.92)
Sets up Ruff without asking.
memory_store: a preference, a decision, a non-obvious discovery.memory_search (or memory_build_context). rekal blends keyword match, semantic similarity, and recency into a single score and returns the top hits.All state is a single file: ~/.rekal/memory.db. No daemon, no cloud, no API keys. For the scoring formula, schema, and embedding model, see Under the hood.
uv tool install rekal # 1. install rekal (or: pip install rekal)
claude mcp add --scope user rekal -- rekal # 2. register the MCP server (all projects)
claude plugin marketplace add janbjorge/rekal # 3. add the plugin marketplace
claude plugin install rekal-skills@rekal # 4. install the plugin
Then add "autoMemoryEnabled": false to ~/.claude/settings.json so Claude Code's built-in memory doesn't compete with rekal.
Restart Claude Code and the agent has persistent memory. For what each step does, the other agents (Codex CLI, OpenCode), and the rationale behind disabling built-in memory, read on.
pip install rekal
# or
uv tool install rekal
Requires Python 3.11+. On first run, rekal creates ~/.rekal/memory.db. To upgrade an existing install later, see Updating.
Three steps: add the MCP server, install the plugin, and disable built-in memory.
1. Add the MCP server — gives Claude Code the memory tools:
claude mcp add --scope user rekal -- rekal
--scope user registers rekal for all your projects. Without it, claude mcp add defaults to local scope and the server loads only in the project where you ran it (MCP scopes) — memory should follow you everywhere. The -- separates Claude Code's own flags from the command that launches the server; stdio is the default transport.
2. Install the plugin — teaches Claude Code when to use those tools, and prevents conflicts with built-in memory:
claude plugin marketplace add janbjorge/rekal
claude plugin install rekal-skills@rekal
3. Disable built-in auto memory — add "autoMemoryEnabled": false to ~/.claude/settings.json:
{
"autoMemoryEnabled": false
}
Why is this required? Left enabled, Claude Code's built-in auto memory competes with rekal. It loads its own memory into the agent's context (context layout) and the agent favors it, writing to a flat file with no search, no deduplication, no ranking. Disabling it (autoMemoryEnabled: false, settings docs) removes the competitor. The plugin's hooks then re-assert rekal: SessionStart restores the context injection auto memory normally provided, and UserPromptSubmit reinforces it every turn.
What if I forget? The plugin's block-memory-writes and redirect-memory-reads hooks catch flat-file memory access (MEMORY.md/.txt, memories.*) and redirect the agent to rekal as a safety net, but it wastes turns hitting them. Disabling auto memory is cleaner.
Can the plugin do this automatically? No — Claude Code only lets a plugin's settings.json set the agent and subagentStatusLine keys (plugin settings); it cannot touch autoMemoryEnabled. This manual step is the only way.
npx claudepluginhub janbjorge/rekal --plugin rekal-skillsMulti-tiered memory and knowledge base with semantic search, auto-compaction, and built-in evaluation. Works across Claude Code, Copilot CLI, OpenCode, Cline, and Cursor.
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.
OpenLTM — Long-Term Memory for AI coding agents: semantic search, context injection, session learning
memX: local-first semantic memory for coding agents. Native Claude Code lifecycle hooks.
PowerMem intelligent memory for Claude Code: add, search, update, and delete memories with Ebbinghaus decay and multi-agent support.