Mnemoteca
OpenCode plugin for local persistent memory using Mnemoteca — offline semantic search, no cloud required
17
38
近 7 天 4
38.4
生态多维模型
1 个月前
2026-08-31
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-mnemoteca@0.3.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-mnemoteca@0.3.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-mnemotecaOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
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.
同类生态推荐
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