tickernelz/opencode-mem
OpenCode plugin that gives coding agents persistent memory using local vector database
What it solves
AI coding agents like OpenCode forget what happened in previous sessions, so you often have to re-explain project decisions, bug fixes, and your preferences. This plugin gives the agent a persistent memory: it stores technical context locally and automatically brings back relevant memories when you start a new session, so the agent can pick up where it left off.
How it works
It runs as a plugin inside OpenCode. All memories are stored in an embedded Turso/libSQL database with built-in vector search — no separate database service needed. When a session goes idle, the plugin sends a background AI request that turns the recent technical work into structured memories. Later, when you ask something, the plugin searches those memories and injects the most relevant ones, plus a learned user profile, into the model's context. It also learns a cross-project profile of your preferences and workflows. You can browse and edit everything in a web UI at http://127.0.0.1:4747, and you can manually add, search, or delete memories with the memory tool. The plugin supports many AI providers and runs local embeddings on CPU (no GPU required).
Who it’s for
Developers who use OpenCode (or similar AI coding agents) and want the agent to remember project-specific details across sessions — decisions, bug patterns, “we tried X and it failed” notes, and personal workflow preferences — without having to repeat them every time.
Highlights
- Local vector database – embedded Turso/libSQL with exact cosine search; no separate vector DB or GPU needed.
- Automatic memory capture – when a session goes idle, a background AI request extracts memorable technical context and stores it.
- Automatic recall – relevant memories and your user profile are injected into the model's context on later turns.
- User profile learning – builds a cross-project summary of your preferences, patterns, and workflows.
- Memory hygiene – deduplication, optional update-on-capture, and a “dreaming” consolidation feature with recoverable trash.
- Multi-provider AI support – works with any provider configured in OpenCode, plus manual APIs like OpenAI, Anthropic, MiniMax, and more.
- Local embeddings – 12+ models run on CPU, or use any OpenAI-compatible embeddings API.
- Full web UI – unified memory–prompt timeline, user profile, skill library, Markdown vault, and health stats.
- Privacy features –
<private>tags, automatic credential redaction before capture, and optional AES-256-GCM encryption at rest. - Portability – optional Markdown vault backend, plus export/import/migrate tools for moving projects.
Related
- Project
- Project
- Project
- Project
- Project