Mnemoteca
OpenCode plugin for local persistent memory using Mnemoteca — offline semantic search, no cloud required
17
38
4 in 7 days
38.4
Multi-signal model
1 month ago
2026-08-31
Install and configure
opencode.jsonWrites to this project's opencode.json — applies to this repository only.
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-mnemoteca@0.3.0"]
}Writes to ~/.config/opencode/opencode.json — applies to every project.
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-mnemoteca@0.3.0"]
}If you want to modify the plugin locally, install it into the project and reference the local path.
shell
pnpm add -D opencode-mnemotecaOpenCode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.
OpenCode plugin for local persistent memory using Mnemoteca. It gives your AI coding agent memory that persists across sessions. It is offline and does not use cloud APIs.
Prerequisites
Install the mnemoteca binary first:
curl -fsSL https://raw.githubusercontent.com/gandazgul/mnemoteca/main/install.sh | sh
mnemoteca setup
See the Mnemoteca README for detailed setup instructions. On first use, Mnemoteca downloads its ML models, approximately 500 MB one time.
Make sure the mnemoteca binary is in your PATH.
Installation
Add the plugin to your OpenCode configuration:
{
"plugin": ["opencode-mnemoteca"]
}
For local development, install from this repository checkout:
npm install
npm run build
Upgrade from opencode-mnemosyne
If you already used the old OpenCode plugin, stop OpenCode before you change the configuration.
- Migrate CLI data first if needed. Use the Mnemoteca migration guide.
- Add
opencode-mnemotecato the same OpenCode configuration scope that usedopencode-mnemosyne. - Restart OpenCode and verify that the memory tools work. Store and recall a harmless test memory if needed.
- Remove
opencode-mnemosynefrom that same configuration scope. - Restart OpenCode again.
Do not load the old and new plugins together for normal use. The agent-facing
memory_* tool names stay stable; only the plugin package and CLI command names
change.
Windows users must finish this replacement before restarting OpenCode. There is
no Windows mnemosyne compatibility shim, alias, copied executable, or renamed
executable.
Memory tools
The agent-facing tool names stay stable. They describe memory capabilities, not product branding.
| Tool | Purpose |
|---|---|
memory_recall |
Search project memory. |
memory_recall_global |
Search global memory. |
memory_store |
Store a project memory. Set core=true to tag it as core. |
memory_store_global |
Store a global memory. Set core=true to tag it as core. |
memory_delete |
Delete a memory by the numeric document ID shown in recall or list output. |
Project memory uses a collection name derived from the project directory name.
If that name is empty or global, the plugin uses default.
The project collection is initialized when the plugin loads. The global
collection is created on first use of mnemoteca add -g or the equivalent
global store tool.
Commands taught to the agent
- Use
mnemoteca search -f plain [query]andmnemoteca search -g -f plain [query]to search relevant memories. - After significant decisions, use
mnemoteca add "memory content"to save a concise fact. Usemnemoteca add -g "memory content"for cross-project preferences. - Delete contradicted memories with
mnemoteca delete [memory id]after storing the updated memory. - Mark critical, always-relevant context as core with
-t core. You can use repeated tags, such asmnemoteca add "database is sqlite" -t core -t tech-stack.
How it works
Mnemoteca is a local document store with hybrid search:
- SQLite storage on your machine.
- BM25 plus vector search.
- Local ONNX Runtime inference.
- No cloud API calls.
The plugin calls the mnemoteca executable with argument arrays. It does not
own data storage, select databases, or run migrations.
Similar plugins
Memory
@navopw/opencode-memory
Persistent semantic memory for OpenCode
Mnemosyne Oss
opencode-mnemosyne-oss
OpenCode plugin for local persistent memory using official Mnemosyne - offline semantic search, no cloud required
Claude Memory
opencode-claude-memory
OpenCode plugin for Claude Code memory: persistent, local-first shared memory with Claude Code-compatible Markdown files, LLM recall, in-process auto extraction, and auto-dream consolidation