[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"readme:opencode-mem":3},"\u003Ch1>OpenCode Memory\u003C\u002Fh1>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fopencode-mem\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fopencode-mem.svg\" alt=\"npm version\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fopencode-mem\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Fopencode-mem.svg\" alt=\"npm downloads\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fopencode-mem\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fl\u002Fopencode-mem.svg\" alt=\"license\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Ftickernelz\u002Fopencode-mem\u002FHEAD\u002F.github\u002Fbanner.png\" alt=\"OpenCode Memory Banner\" \u002F>\u003C\u002Fp>\n\u003Cp>A persistent memory system for AI coding agents that enables long-term context retention across sessions using local vector database technology.\u003C\u002Fp>\n\u003Ch2>Visual Overview\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>Project Memory Timeline:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Ftickernelz\u002Fopencode-mem\u002FHEAD\u002F.github\u002Fscreenshot-project-memory.png\" alt=\"Project Memory Timeline\" \u002F>\u003C\u002Fp>\n\u003Cp>\u003Cstrong>User Profile Viewer:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Ftickernelz\u002Fopencode-mem\u002FHEAD\u002F.github\u002Fscreenshot-user-profile.png\" alt=\"User Profile Viewer\" \u002F>\u003C\u002Fp>\n\u003Ch2>Core Features\u003C\u002Fh2>\n\u003Cp>Local vector database with SQLite + USearch-first vector indexing and ExactScan fallback, persistent project memories, automatic user profile learning, unified memory-prompt timeline, full-featured web UI, intelligent prompt-based memory extraction, multi-provider AI support (OpenAI, Anthropic), 12+ local embedding models, smart deduplication, and built-in privacy protection.\u003C\u002Fp>\n\u003Ch2>Prerequisites\u003C\u002Fh2>\n\u003Cp>This plugin uses \u003Ccode>USearch\u003C\u002Fcode> for preferred in-memory vector indexing with automatic ExactScan fallback. No custom SQLite build or browser runtime shim is required.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Recommended runtime:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Bun\u003C\u002Fli>\n\u003Cli>Standard OpenCode plugin environment\u003C\u002Fli>\n\u003Cli>Internet access on first use if you use the default local embedding model, because the model is downloaded by \u003Ccode>@huggingface\u002Ftransformers\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>For source\u002Fdevelopment installs, run \u003Ccode>bun install\u003C\u002Fcode> before building or testing. The published plugin package installs its runtime dependencies automatically through OpenCode.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Notes:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>If \u003Ccode>USearch\u003C\u002Fcode> is unavailable or fails at runtime, the plugin automatically falls back to exact vector scanning.\u003C\u002Fli>\n\u003Cli>SQLite remains the source of truth; search indexes are rebuilt from SQLite data when needed.\u003C\u002Fli>\n\u003Cli>Auto-capture and user profile learning require an AI provider that can return structured\u002Ftool-call output. Memory search\u002Fadd\u002Flist still work without auto-capture provider configuration.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Getting Started\u003C\u002Fh2>\n\u003Cp>Add to your OpenCode configuration at \u003Ccode>~\u002F.config\u002Fopencode\u002Fopencode.json\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-jsonc\">{\n  \"plugin\": [\"opencode-mem\"],\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>The plugin downloads automatically on next startup.\u003C\u002Fp>\n\u003Ch2>Usage Examples\u003C\u002Fh2>\n\u003Cpre>\u003Ccode class=\"language-typescript\">memory({ mode: \"add\", content: \"Project uses microservices architecture\" });\nmemory({ mode: \"search\", query: \"architecture decisions\" });\nmemory({ mode: \"search\", query: \"architecture decisions\", scope: \"all-projects\" });\nmemory({ mode: \"profile\" });\nmemory({ mode: \"list\", limit: 10 });\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Access the web interface at \u003Ccode>http:\u002F\u002F127.0.0.1:4747\u003C\u002Fcode> for visual memory browsing and management.\u003C\u002Fp>\n\u003Ch2>Configuration Essentials\u003C\u002Fh2>\n\u003Cp>Configure at \u003Ccode>~\u002F.config\u002Fopencode\u002Fopencode-mem.jsonc\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cp>The plugin creates a full commented template at this path on first startup. This trimmed example shows the most common settings:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-jsonc\">{\n  \"storagePath\": \"~\u002F.opencode-mem\u002Fdata\",\n  \"userEmailOverride\": \"user@example.com\",\n  \"userNameOverride\": \"John Doe\",\n  \"embeddingModel\": \"Xenova\u002Fnomic-embed-text-v1\",\n  \u002F\u002F Optional OpenAI-compatible embedding endpoint:\n  \u002F\u002F \"embeddingApiUrl\": \"https:\u002F\u002Fapi.openai.com\u002Fv1\",\n  \u002F\u002F \"embeddingApiKey\": \"env:\u002F\u002FOPENAI_API_KEY\",\n  \u002F\u002F \"embeddingModel\": \"text-embedding-3-small\",\n\n  \"memory\": {\n    \"defaultScope\": \"project\",\n  },\n  \"webServerEnabled\": true,\n  \"webServerPort\": 4747,\n\n  \"autoCaptureEnabled\": true,\n  \"autoCaptureLanguage\": \"auto\",\n\n  \"opencodeProvider\": \"anthropic\",\n  \"opencodeModel\": \"claude-haiku-4-5-20251001\",\n\n  \u002F\u002F Manual fallback if you do not use opencodeProvider:\n  \u002F\u002F \"memoryProvider\": \"openai-chat\",\n  \u002F\u002F \"memoryModel\": \"gpt-4o-mini\",\n  \u002F\u002F \"memoryApiUrl\": \"https:\u002F\u002Fapi.openai.com\u002Fv1\",\n  \u002F\u002F \"memoryApiKey\": \"env:\u002F\u002FOPENAI_API_KEY\",\n\n  \"showAutoCaptureToasts\": true,\n  \"showUserProfileToasts\": true,\n  \"showErrorToasts\": true,\n\n  \"userProfileAnalysisInterval\": 10,\n  \"maxMemories\": 10,\n\n  \"compaction\": {\n    \"enabled\": true,\n\u003C\u002Fcode>\u003C\u002Fpre>\n",1784240407819]