Prerequisites
This plugin uses embedded Turso (@tursodatabase/database) with F32_BLOB vectors and exact cosine search via vector_distance_cos. No separate vector database or custom SQLite build is required.
Recommended runtime:
- Bun
- Standard OpenCode plugin environment
- Internet access on first use if you use the default local embedding model, because the model is downloaded by
@huggingface/transformers. - For source/development installs, run
bun installbefore building or testing. The published plugin package installs its runtime dependencies automatically through OpenCode.
CI-tested platforms: Linux, Windows, and macOS 15 / macOS 26 on Apple Silicon (darwin/arm64). Intel Mac (darwin/x64) is not supported — @tursodatabase/database and fixed onnxruntime-node releases ship no x64 native binding. Older macOS releases are not excluded by that matrix; they are simply outside the current GitHub-hosted runner set.
Notes:
- Vector embeddings are stored and searched directly in Turso; inserts store
F32_BLOBvectors for exact cosine ranking. - Vector search uses exact cosine distance via
vector_distance_cos(no DiskANN / approximate index), with optional keyword hybrid ranking when a query string is provided (@tursodatabase/databasedoes not ship FTS5). - Session lookups use an indexed
session_idcolumn (backfilled frommetadata.sessionIDon schema v2). - Auto-capture and user profile learning require an AI provider that can return structured/tool-call output. Memory search/add/list still work without auto-capture provider configuration.
Hardware / resource expectations
Section titled “Hardware / resource expectations”opencode-mem does not require a GPU. Local embeddings run on CPU via @huggingface/transformers and ONNX (there is no MLX backend). Extra VRAM is not needed.
| Workload | Typical extra resources |
|---|---|
Local embeddings (default Xenova/nomic-embed-text-v1) |
About 0.5–2 GB RAM while the model is loaded, depending on the Hugging Face id you pick. First use downloads the model; disk cache lives under {storagePath}/.cache (default ~/.opencode-mem/data/.cache) and is often hundreds of MB to ~1–2 GB per model. |
Remote embeddings (embeddingApiUrl + embeddingApiKey) |
Negligible local ML RAM — only plugin + Turso overhead. |
| Database / plugin | Turso/libSQL on disk under storagePath. Size grows with how many memories you store, not with GPU memory. |
Platform limits above still apply (no Intel Mac darwin/x64; use Apple Silicon, Linux, Windows, or a remote embedding endpoint). See Choosing / configuring embeddings.