Files
Memoh/assets/getting-started_memory.md.5cl77orc.js
T
2026-04-23 13:02:42 +00:00

2 lines
7.6 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,c as r,ag as a}from"./chunks/framework.CAXxHpAX.js";const g=JSON.parse('{"title":"Bot Memory Management","description":"","frontmatter":{},"headers":[],"relativePath":"getting-started/memory.md","filePath":"getting-started/memory.md","lastUpdated":1776332711000}'),i={name:"getting-started/memory.md"};function n(s,e,m,l,d,h){return o(),r("div",null,[...e[0]||(e[0]=[a('<h1 id="bot-memory-management" tabindex="-1">Bot Memory Management <a class="header-anchor" href="#bot-memory-management" aria-label="Permalink to &quot;Bot Memory Management&quot;"></a></h1><p>Memoh&#39;s structured long-term memory system allows bots to remember information across multiple conversations, providing contextually relevant and personalized interactions.</p><h2 id="prerequisites" tabindex="-1">Prerequisites <a class="header-anchor" href="#prerequisites" aria-label="Permalink to &quot;Prerequisites&quot;"></a></h2><p>Before using the <strong>Memory</strong> tab, make sure your bot already has a <strong>Memory Provider</strong> configured.</p><ol><li>Create a provider from one of the <a href="/memory-providers/">Memory Providers</a> (Built-in, Mem0, or OpenViking).</li><li>Open your bot&#39;s <strong>General</strong> tab.</li><li>Select the provider in the <strong>Memory Provider</strong> field.</li><li>Click <strong>Save</strong>.</li></ol><p>Without a memory provider, the bot will not have an active memory backend configuration.</p><hr><h2 id="concept-memory-retrieval" tabindex="-1">Concept: Memory Retrieval <a class="header-anchor" href="#concept-memory-retrieval" aria-label="Permalink to &quot;Concept: Memory Retrieval&quot;"></a></h2><p>Memories are stored and retrieved through the assigned memory provider. Depending on the provider type and mode, retrieval may use file-based indexing, sparse vectors, dense embeddings, or an external API. When a user sends a message, Memoh finds the most relevant memories and includes them in the bot&#39;s runtime context.</p><p>This page is about <strong>long-term memory</strong>. It is separate from <strong>session context compaction</strong>, which reduces the prompt footprint of a single conversation session. See <a href="/getting-started/compaction.html">Context Compaction</a>.</p><hr><h2 id="operations" tabindex="-1">Operations <a class="header-anchor" href="#operations" aria-label="Permalink to &quot;Operations&quot;"></a></h2><p>Manage your bot&#39;s memories from the <strong>Memory</strong> tab in the Bot Detail page.</p><h3 id="_1-creating-memories" tabindex="-1">1. Creating Memories <a class="header-anchor" href="#_1-creating-memories" aria-label="Permalink to &quot;1. Creating Memories&quot;"></a></h3><ul><li><strong>New Memory</strong>: Manually enter a memory&#39;s content in the provided textarea.</li><li><strong>From Conversation</strong>: Select specific messages from the bot&#39;s conversation history to extract into memory.</li></ul><h3 id="_2-searching-and-managing" tabindex="-1">2. Searching and Managing <a class="header-anchor" href="#_2-searching-and-managing" aria-label="Permalink to &quot;2. Searching and Managing&quot;"></a></h3><ul><li><strong>Search</strong>: Filter memories by ID or text content.</li><li><strong>Edit</strong>: Modify existing memory entries directly in the list.</li><li><strong>Delete</strong>: Remove memories that are no longer needed.</li></ul><hr><h2 id="memory-compaction" tabindex="-1">Memory Compaction <a class="header-anchor" href="#memory-compaction" aria-label="Permalink to &quot;Memory Compaction&quot;"></a></h2><p>Over time, long-term memories can accumulate and become redundant. The <strong>Compact</strong> action in the <strong>Memory</strong> tab rewrites the stored memory set itself.</p><p>This operation is provider-level memory maintenance. It is useful when you want to:</p><ul><li>merge overlapping memories</li><li>remove stale or low-value entries</li><li>improve retrieval quality by reducing noise</li></ul><p>Parameters:</p><ul><li><strong>Ratio</strong> — Compression ratio such as <code>0.8</code>, <code>0.5</code>, or <code>0.3</code>. Lower values make compaction more aggressive.</li><li><strong>Decay Days</strong> — Optionally restrict compaction to older memories only.</li></ul><p>This is different from <a href="/getting-started/compaction.html">Context Compaction</a>, which compresses the active prompt for one session rather than rewriting stored memories.</p><hr><h2 id="rebuild" tabindex="-1">Rebuild <a class="header-anchor" href="#rebuild" aria-label="Permalink to &quot;Rebuild&quot;"></a></h2><p>The <strong>Rebuild</strong> feature re-indexes all memories from scratch. This is useful when:</p><ul><li>You have changed the memory provider&#39;s mode (e.g., switching from <code>off</code> to <code>sparse</code>).</li><li>The vector index has become inconsistent.</li><li>You want to re-process all memories with updated settings.</li></ul><p>Click <strong>Rebuild</strong> in the Memory tab to start the process. You can monitor the rebuild status in real-time.</p><hr><h2 id="status" tabindex="-1">Status <a class="header-anchor" href="#status" aria-label="Permalink to &quot;Status&quot;"></a></h2><p>The Memory tab shows the current <strong>status</strong> of the memory provider for this bot:</p><ul><li><strong>Connected</strong> — The memory backend is reachable and operational.</li><li><strong>Error</strong> — There is an issue with the memory provider configuration or connectivity.</li></ul><p>Use the status indicator to quickly verify that the memory system is working before troubleshooting other issues.</p><hr><h2 id="usage-statistics" tabindex="-1">Usage Statistics <a class="header-anchor" href="#usage-statistics" aria-label="Permalink to &quot;Usage Statistics&quot;"></a></h2><p>The Memory tab displays storage usage information:</p><ul><li><strong>Total Memories</strong> — The number of memory entries stored for this bot.</li><li><strong>Index Status</strong> — Whether the vector index is up-to-date.</li></ul><hr><h2 id="memory-vs-session-context" tabindex="-1">Memory vs Session Context <a class="header-anchor" href="#memory-vs-session-context" aria-label="Permalink to &quot;Memory vs Session Context&quot;"></a></h2><p>Memoh has two different &quot;compaction&quot; concepts:</p><table tabindex="0"><thead><tr><th>Concept</th><th>Scope</th><th>Where to trigger it</th><th>What it changes</th></tr></thead><tbody><tr><td><strong>Memory Compaction</strong></td><td>Long-term memory provider</td><td>Memory tab</td><td>Rewrites stored memory entries</td></tr><tr><td><strong>Context Compaction</strong></td><td>One conversation session</td><td>Session status panel or <code>/compact</code></td><td>Summarizes older session context for future model calls</td></tr></tbody></table><p>If you are trying to reduce retrieval noise across many conversations, use <strong>Memory Compaction</strong>.</p><p>If you are trying to shorten the currently active conversation history, use <strong>Context Compaction</strong>.</p><hr><h2 id="bot-interaction" tabindex="-1">Bot Interaction <a class="header-anchor" href="#bot-interaction" aria-label="Permalink to &quot;Bot Interaction&quot;"></a></h2><ul><li>The bot automatically searches and retrieves memories during chat.</li><li>The assigned <strong>Memory Provider</strong> controls the memory backend used by the bot.</li><li>Provider-specific settings (such as memory mode, embedding model, or API keys) are configured in the provider itself — see <a href="/memory-providers/">Memory Providers</a>.</li><li>Memories provide the long-term knowledge that makes each bot unique to its owner.</li></ul>',48)])])}const u=t(i,[["render",n]]);export{g as __pageData,u as default};