By jersobh
Automatic semantic memory: recalls relevant facts from past sessions on every prompt and auto-saves each turn, using a local EpochDB store. Portable, offline, zero-config.
Give Claude Code an automatic, local, offline long-term memory.
/plugin marketplace add jersobh/epochdb-memory-plugin
/plugin install epochdb-memory@epochdb-memory
On first session the plugin creates its own .venv and installs EpochDB in the
background. Memory recall lights up automatically once that finishes (a minute
or two the first time). Nothing else is required.
git clone https://github.com/jersobh/epochdb-memory-plugin
cd epochdb-memory-plugin
./setup.sh # creates .venv and installs deps
claude --plugin-dir "$PWD"
/memory-stats — show counts, storage path, and retrieval mode./memory-search <query> — semantically search stored memories.| Hook | Script | What it does |
|---|---|---|
SessionStart | hooks/setup_epochdb.py | Ensures the venv + EpochDB exist (background install). |
UserPromptSubmit | hooks/epoch_memory_hook.py | Retrieves top-k relevant memories, injects them via additionalContext. |
Stop | hooks/epoch_save_hook.py | Parses the transcript and saves the finished turn. |
Hooks ship with a #!/usr/bin/env python3 shebang and re-exec themselves into
the plugin's private venv at runtime — so they run correctly regardless of the
machine, the user, or where the plugin is installed. If EpochDB isn't ready
yet, every hook degrades to a harmless no-op.
| Env var | Default | Meaning |
|---|---|---|
EPOCHDB_STORAGE_DIR | ~/.epochdb | Where memories are stored. |
zsh users:
pip install epochdb[embeddings]fails withzsh: no matches foundbecause zsh expands the[...]. Quote it:pip install "epochdb[embeddings]". Theembeddingsextra does exist; this is purely shell globbing.setup.sh,requirements.txt, and the SessionStart hook all already quote it, so the automatic path is unaffected.
epochdb[embeddings] (sentence-transformers
all-MiniLM-L6-v2. Fully offline after the first run.epochdb (entity/keyword
retrieval). Memory still works, with weaker recall.Tip: to avoid the large CUDA torch download, pre-install the CPU build into the plugin venv before first use:
.venv/bin/pip install torch --index-url https://download.pytorch.org/whl/cpu
Run the reproducible benchmark yourself:
.venv/bin/python benchmarks/benchmark.py
It seeds a labeled project history, then measures retrieval accuracy, gating, and token economics against a real EpochDB store. Measured results:
| Metric | Result |
|---|---|
| Retrieval accuracy (hit@1 / hit@3) | 88% / 100% |
| MRR | 0.92 |
| Irrelevant prompts that inject nothing (gating) | 3/3 |
| Avg context injected per recall | ~30–300 tokens (bounded by top-k) |
Typical savings: ~85–98% less carried cross-session context when the
realistic alternative is reloading the prior conversation (i.e. what
claude --resume / --continue do — they reload the entire prior transcript,
resent every turn). The plugin recalls a bounded top-k snippet only when it's
relevant, so it scales: the longer the history you'd otherwise reload, the
larger the reduction.
Read this honestly:
CLAUDE.md or good compaction → savings ≈ 0. There the
value is recall quality, not tokens.EPOCHDB_MIN_SCORE, default 0.30) ensures unrelated
prompts inject nothing, so the plugin doesn't tax every turn.Net: it's a strong win when you'd otherwise reload/re-paste prior sessions, and
roughly neutral (a quality feature, not a cost one) if you already keep a tight
CLAUDE.md.
MIT © Jefferson A. (jersobh)
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.
npx claudepluginhub jersobh/epochdb-memory-plugin --plugin epochdb-memoryComplete AI coding workflow system. Self-correcting memory + persistent FTS5-indexed research wikis + auto-research loop + multi-LLM council on a single SQLite store. 33 skills, 8 agents, 22 commands, 37 hook scripts across 24 events. Cross-agent via SkillKit.
Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.
Give your AI a memory — mine projects and conversations into a searchable palace. 33 MCP tools, auto-save hooks, and guided setup.
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Intelligent draw.io diagramming plugin with AI-powered diagram generation, multi-platform embedding (GitHub, Confluence, Azure DevOps, Notion, Teams, Harness), conditional formatting, live data binding, and MCP server integration for programmatic diagram creation and management.
Persistent file-based planning for AI coding agents. Crash-proof markdown plans (task_plan.md, findings.md, progress.md) that survive context loss and /clear, with an opt-in completion gate and multi-agent shared state. Manus-style. Works with Claude Code, Codex CLI, Cursor, Kiro, OpenCode and 60+ agents via the SKILL.md standard. Includes Arabic, German, Spanish, and Chinese (Simplified and Traditional).