Files
Memoh/assets/memory-providers_builtin.md.o-ZeSsoj.js
T
2026-03-25 17:32:38 +00:00

7 lines
10 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as t,o as i,c as a,ag as s}from"./chunks/framework.CvgP6Fyv.js";const g=JSON.parse('{"title":"Built-in Memory Provider","description":"","frontmatter":{},"headers":[],"relativePath":"memory-providers/builtin.md","filePath":"memory-providers/builtin.md","lastUpdated":1773501089000}'),r={name:"memory-providers/builtin.md"};function o(n,e,d,l,h,p){return i(),a("div",null,[...e[0]||(e[0]=[s(`<h1 id="built-in-memory-provider" tabindex="-1">Built-in Memory Provider <a class="header-anchor" href="#built-in-memory-provider" aria-label="Permalink to &quot;Built-in Memory Provider&quot;"></a></h1><p>The built-in memory provider is the standard memory backend shipped with Memoh. It works with Memoh&#39;s memory pipeline and supports:</p><ul><li>Automatic memory extraction from conversations</li><li>Semantic memory retrieval during chat</li><li>Manual memory creation and editing</li><li>Memory compaction and rebuild workflows</li></ul><p>The built-in provider operates in one of three <strong>memory modes</strong>, each with different infrastructure requirements and retrieval capabilities.</p><hr><h2 id="memory-modes" tabindex="-1">Memory Modes <a class="header-anchor" href="#memory-modes" aria-label="Permalink to &quot;Memory Modes&quot;"></a></h2><table tabindex="0"><thead><tr><th>Mode</th><th>Index</th><th>Requirements</th><th>Use Case</th></tr></thead><tbody><tr><td><strong>Off</strong></td><td>File-based only</td><td>None</td><td>Lightweight setup, no vector search</td></tr><tr><td><strong>Sparse</strong></td><td>Neural sparse vectors</td><td>Sparse service + Qdrant (<code>--profile sparse</code>)</td><td>Good retrieval quality without embedding API costs</td></tr><tr><td><strong>Dense</strong></td><td>Dense embeddings</td><td>Embedding model + Qdrant (<code>--profile qdrant</code>)</td><td>Highest-quality semantic search</td></tr></tbody></table><h3 id="how-sparse-mode-works" tabindex="-1">How Sparse Mode Works <a class="header-anchor" href="#how-sparse-mode-works" aria-label="Permalink to &quot;How Sparse Mode Works&quot;"></a></h3><p>Sparse mode uses the <a href="https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-multilingual-v1" target="_blank" rel="noreferrer"><code>opensearch-neural-sparse-encoding-multilingual-v1</code></a> model (from the OpenSearch project) to convert text into sparse vectors — compact lists of token indices with importance weights. Unlike dense mode, which requires an external embedding API, the sparse model runs locally in the <code>sparse</code> container with no API key or cost. It supports multiple languages and provides significantly better retrieval quality than keyword-only search.</p><hr><h2 id="creating-a-built-in-provider" tabindex="-1">Creating a Built-in Provider <a class="header-anchor" href="#creating-a-built-in-provider" aria-label="Permalink to &quot;Creating a Built-in Provider&quot;"></a></h2><ol><li>Navigate to the <strong>Memory Providers</strong> page.</li><li>Click <strong>Add Memory Provider</strong>.</li><li>Fill in the following fields: <ul><li><strong>Name</strong>: A display name for this provider.</li><li><strong>Provider Type</strong>: Select <code>builtin</code>.</li></ul></li><li>Click <strong>Create</strong>.</li></ol><hr><h2 id="configuring-a-built-in-provider" tabindex="-1">Configuring a Built-in Provider <a class="header-anchor" href="#configuring-a-built-in-provider" aria-label="Permalink to &quot;Configuring a Built-in Provider&quot;"></a></h2><p>After creating a provider, select it from the list and configure its settings.</p><table tabindex="0"><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Memory Mode</strong></td><td><code>off</code> (default), <code>sparse</code>, or <code>dense</code>. Controls how memories are indexed and retrieved.</td></tr><tr><td><strong>Embedding Model</strong></td><td>Embedding model for dense vector search. Only used in <code>dense</code> mode.</td></tr><tr><td><strong>Qdrant Collection</strong></td><td>Qdrant collection name. Defaults to <code>memory_sparse</code>.</td></tr></tbody></table><h3 id="managing-providers" tabindex="-1">Managing Providers <a class="header-anchor" href="#managing-providers" aria-label="Permalink to &quot;Managing Providers&quot;"></a></h3><ul><li><strong>Edit</strong>: Select a provider and update its settings.</li><li><strong>Delete</strong>: Remove a provider you no longer use.</li></ul><hr><h2 id="infrastructure-requirements" tabindex="-1">Infrastructure Requirements <a class="header-anchor" href="#infrastructure-requirements" aria-label="Permalink to &quot;Infrastructure Requirements&quot;"></a></h2><h3 id="off-mode" tabindex="-1">Off Mode <a class="header-anchor" href="#off-mode" aria-label="Permalink to &quot;Off Mode&quot;"></a></h3><p>No additional infrastructure required. Memories are stored and retrieved using file-based indexing only.</p><h3 id="sparse-mode" tabindex="-1">Sparse Mode <a class="header-anchor" href="#sparse-mode" aria-label="Permalink to &quot;Sparse Mode&quot;"></a></h3><p>Requires the <strong>sparse service</strong> (runs the <a href="https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-multilingual-v1" target="_blank" rel="noreferrer"><code>opensearch-neural-sparse-encoding-multilingual-v1</code></a> model locally) and <strong>Qdrant</strong> vector database. Enable both with Docker Compose profiles:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --profile</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> qdrant</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --profile</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> sparse</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> up</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span></span></code></pre></div><p>The following sections must be present in <code>config.toml</code>:</p><div class="language-toml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">toml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">qdrant</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">base_url = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;http://qdrant:6334&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sparse</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">base_url = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;http://sparse:8085&quot;</span></span></code></pre></div><h3 id="dense-mode" tabindex="-1">Dense Mode <a class="header-anchor" href="#dense-mode" aria-label="Permalink to &quot;Dense Mode&quot;"></a></h3><p>Requires an <strong>embedding model</strong> (configured in the provider settings) and <strong>Qdrant</strong>:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --profile</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> qdrant</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> up</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span></span></code></pre></div><p>The Qdrant section must be present in <code>config.toml</code>:</p><div class="language-toml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">toml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">qdrant</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">base_url = </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;http://qdrant:6334&quot;</span></span></code></pre></div><hr><h2 id="assigning-a-memory-provider-to-a-bot" tabindex="-1">Assigning a Memory Provider to a Bot <a class="header-anchor" href="#assigning-a-memory-provider-to-a-bot" aria-label="Permalink to &quot;Assigning a Memory Provider to a Bot&quot;"></a></h2><ol><li>Navigate to the <strong>Bots</strong> page and open your bot.</li><li>Go to the <strong>Settings</strong> tab.</li><li>Find the <strong>Memory Provider</strong> dropdown.</li><li>Select the provider you created.</li><li>Click <strong>Save</strong>.</li></ol><p>If no memory provider is selected, the bot will not use that provider configuration in its runtime settings.</p><hr><h2 id="using-memory-after-setup" tabindex="-1">Using Memory After Setup <a class="header-anchor" href="#using-memory-after-setup" aria-label="Permalink to &quot;Using Memory After Setup&quot;"></a></h2><p>Once a memory provider is assigned to the bot, you can manage actual memories from the bot&#39;s <strong>Memory</strong> tab:</p><ul><li>Create memories manually</li><li>Extract memories from conversations</li><li>Search, edit, and delete memories</li><li>Compact or rebuild the memory store</li></ul><p>For day-to-day memory operations, continue with <a href="/getting-started/memory.html">Bot Memory Management</a>.</p>`,41)])])}const m=t(r,[["render",o]]);export{g as __pageData,m as default};