docs: update memory and browser

This commit is contained in:
Acbox
2026-03-07 16:58:56 +08:00
parent 7f3f8ce2e5
commit 05d2240c16
7 changed files with 242 additions and 22 deletions
+17
View File
@@ -48,6 +48,10 @@ export const en = [
text: 'Bot Channels',
link: '/getting-started/channels.md'
},
{
text: 'Browser Contexts',
link: '/getting-started/browser.md'
},
{
text: 'Memory Management',
link: '/getting-started/memory.md'
@@ -74,6 +78,19 @@ export const en = [
},
]
},
{
text: 'Memory Providers',
items: [
{
text: 'Overview',
link: '/memory-providers/index.md'
},
{
text: 'Built-in',
link: '/memory-providers/builtin.md'
},
]
},
{
text: 'Channels',
items: [
+1
View File
@@ -44,6 +44,7 @@ Unified channel adapter architecture for connecting to multiple messaging platfo
Bots come with a rich set of built-in tools:
- **Web Search** — Configurable search providers (Brave, Bing, Google, Tavily, SearXNG, DuckDuckGo, and more) for real-time information
- **Browser Automation** — Use Playwright-powered browser tools for navigation, clicking, form filling, screenshots, PDF export, and rendered page inspection
- **Subagents** — Create specialized subagents with independent context, assign skills, and delegate complex tasks
- **Skills** — Define bot personality via IDENTITY.md, SOUL.md, and modular skill files that bots can enable/disable at runtime
- **Container Operations** — Read/write files, edit code, and execute commands inside the container
+19 -12
View File
@@ -28,18 +28,25 @@ The **Overview** tab provides a quick health check of the bot's services. It mon
If any check shows a warning or error, follow the provided details to troubleshoot.
## Configuring the Bot's Brain (Models)
## Configuring the Bot's Core Settings
After creating a bot, the most important step is assigning its LLM models. These define how the bot thinks, remembers, and processes information.
After creating a bot, the most important step is configuring its runtime settings. These define how the bot talks, remembers, searches, and uses browser automation.
1. Navigate to your bot's **Detail Page**.
2. Go to the **Settings** tab.
3. In the **Model Selection** section, you will find three dropdowns:
- **Chat Model**: Used for standard conversations with users. Select a high-quality chat model (e.g., GPT-4o).
- **Memory Model**: Used for summarizing context and extracting key facts into the bot's long-term memory.
- **Embedding Model**: Used to convert text into vector embeddings for semantic search within the memory system. This must be an `embedding` type model.
4. Select the models you previously configured in the [Models](/getting-started/provider-and-model) page.
5. Click **Save** at the bottom of the form.
1. Navigate to your bot's **Detail Page**.
2. Go to the **Settings** tab.
3. Configure the core fields:
- **Chat Model**: Used for standard conversations with users.
- **Memory Provider**: Select the memory backend the bot should use.
- **Search Provider**: Select the search engine provider for web search.
- **Browser Context**: Select the browser profile the bot should use for browser automation.
4. Click **Save** at the bottom of the form.
If you have not created these resources yet, set them up first:
- [LLM Provider and Model](/getting-started/provider-and-model.md)
- [Built-in Memory Provider](/memory-providers/builtin.md)
- [Search Providers](/getting-started/search-provider.md)
- [Browser Contexts](/getting-started/browser.md)
---
@@ -50,9 +57,9 @@ The **Settings** tab contains all the core parameters that define your bot's beh
| Field | Description |
|-------|-------------|
| **Chat Model** | The main LLM used for generating chat responses. |
| **Memory Model** | The LLM used for summarizing context and managing memories. |
| **Embedding Model** | The model used to generate vector embeddings for semantic memory search. |
| **Memory Provider** | The memory backend assigned to the bot. The built-in provider can optionally define its own memory and embedding models. |
| **Search Provider** | The search engine used for web browsing capabilities. |
| **Browser Context** | The browser environment used for web automation, such as viewport, locale, and mobile behavior. |
| **Max Context Load Time** | Time limit (seconds) for loading context before generation. |
| **Max Context Tokens** | Token limit for the loaded conversation history. |
| **Language** | The bot's primary communication language. |
+84
View File
@@ -0,0 +1,84 @@
# Browser Contexts
Memoh can give a bot access to a headless browser through the **Browser Gateway**. A **Browser Context** stores the browser environment a bot should use, such as viewport size, locale, timezone, and mobile behavior.
Once a browser context is assigned to a bot, the bot can use browser tools to open pages, click elements, fill forms, capture screenshots, and inspect page content.
---
## Concept: Browser Gateway
The Browser Gateway is powered by **Playwright** and provides browser automation for bots. In practice, a browser context acts like a reusable browser profile configuration for one or more bots.
Typical use cases include:
- Navigating websites
- Clicking buttons and links
- Filling and submitting forms
- Reading rendered page content
- Capturing screenshots or PDFs
---
## Creating a Browser Context
Manage contexts from the **Browser Contexts** page in the sidebar.
1. Navigate to the **Browser Contexts** page.
2. Click **Add Browser Context**.
3. Fill in the following field:
- **Name**: A display name for this browser context.
4. Click **Create**.
---
## Configuring a Browser Context
After creating a context, select it from the sidebar and update its settings.
| Field | Description |
|-------|-------------|
| **Name** | The display name shown in the UI. |
| **Viewport Width** | Browser viewport width in pixels. |
| **Viewport Height** | Browser viewport height in pixels. |
| **User Agent** | Optional custom browser user agent string. |
| **Device Scale Factor** | Optional device pixel ratio. |
| **Locale** | Optional locale such as `en-US` or `zh-CN`. |
| **Timezone ID** | Optional timezone such as `UTC` or `Asia/Shanghai`. |
| **Is Mobile** | Enables mobile-style browser behavior. |
| **Ignore HTTPS Errors** | Allows navigation to sites with invalid HTTPS certificates. |
### Managing Contexts
- **Edit**: Select a context and update its configuration.
- **Delete**: Remove a context you no longer use.
---
## Assigning a Browser Context to a Bot
1. Navigate to the **Bots** page and open your bot.
2. Go to the **Settings** tab.
3. Find the **Browser Context** dropdown.
4. Select the context you created.
5. Click **Save**.
After saving, the bot can use that browser context when browser tools are invoked.
---
## Bot Interaction
When a browser context is configured, the bot can use built-in browser tools such as:
- `browser_action`: perform actions like navigation, click, fill, select, scroll, tab management, screenshot, or PDF export
- `browser_observe`: inspect the current page and gather information for the model
This lets the bot interact with real websites instead of relying only on static HTML or search results.
---
## Next Steps
- If you have not configured memory yet, continue with [Built-in Memory Provider](/memory-providers/builtin.md).
- To manage a bot's long-term knowledge after setup, see [Bot Memory Management](/getting-started/memory.md).
+24 -10
View File
@@ -1,10 +1,23 @@
# Bot Memory Management
Memoh's structured long-term memory system allows Bots to remember information across multiple conversations, providing contextually relevant and personalized interactions.
Memoh's structured long-term memory system allows bots to remember information across multiple conversations, providing contextually relevant and personalized interactions.
## Prerequisites
Before using the **Memory** tab, make sure your bot already has a **Memory Provider** configured.
1. Create a provider from the [Built-in Memory Provider](/memory-providers/builtin.md) guide.
2. Open your bot's **Settings** tab.
3. Select the provider in the **Memory Provider** field.
4. Click **Save**.
Without a memory provider, the bot will not have an active memory backend configuration.
---
## Concept: Semantic Search
Memories are stored in a **Qdrant** vector database. When a user asks a question, Memoh performs a semantic search to find the most relevant "memories" and includes them in the bot's system prompt.
With the built-in memory provider, memories are stored in Memoh's memory system and retrieved through semantic search. When a user asks a question, Memoh finds the most relevant memories and includes them in the bot's runtime context.
---
@@ -15,7 +28,7 @@ Manage your bot's memories from the **Memory** tab in the Bot Detail page.
### 1. Creating Memories
- **New Memory**: Manually enter a memory's content in the provided textarea.
- **From Conversation**: Select specific messages from the bot's conversation history to "extract" into memory.
- **From Conversation**: Select specific messages from the bot's conversation history to extract into memory.
### 2. Searching and Managing
@@ -29,25 +42,26 @@ Manage your bot's memories from the **Memory** tab in the Bot Detail page.
Over time, memories can accumulate and become redundant. The **Compact** feature helps optimize the memory pool.
- **Ratio**: Set the compression ratio (e.g., `0.8`, `0.5`, `0.3`) to determine how much information is retained.
- **Decay Days**: Optionally specify a time window to only compact memories older than a certain number of days.
- **Ratio**: Set the compression ratio (for example `0.8`, `0.5`, or `0.3`) to determine how much information is retained.
- **Decay Days**: Optionally specify a time window to compact only memories older than a certain number of days.
---
## Visualization: Vector Manifold
The Memory tab includes advanced visual tools to help you understand how the memory system is performing:
The Memory tab includes visual tools to help you understand how the memory system is performing:
### Top-K Bucket Chart
Shows the distribution of relevant memories retrieved for the most recent queries.
### CDF Curve (Cumulative Distribution Function)
Visualizes the scoring threshold of retrieved memories, helping you fine-tune how much "relevant" information the bot should consider.
Visualizes the scoring threshold of retrieved memories, helping you fine-tune how much relevant information the bot should consider.
---
## Bot Interaction
- The bot will automatically search for and retrieve memories during every interaction.
- The **Memory Model** configured in the **Settings** tab is used for extracting and summarizing these memories.
- Memories provide the "long-term knowledge" that makes each bot unique to its owner.
- The bot automatically searches and retrieves memories during chat.
- The assigned **Memory Provider** controls the memory backend used by the bot.
- For the built-in provider, you can optionally configure a **Memory Model** and an **Embedding Model** inside the provider settings.
- Memories provide the long-term knowledge that makes each bot unique to its owner.
+69
View File
@@ -0,0 +1,69 @@
# Built-in Memory Provider
The built-in memory provider is the standard memory backend shipped with Memoh. It works with Memoh's memory pipeline and supports:
- Automatic memory extraction from conversations
- Semantic memory retrieval during chat
- Manual memory creation and editing
- Memory compaction and rebuild workflows
To configure it well, you usually assign:
- **Memory Model**: The LLM used for memory extraction and decision making
- **Embedding Model**: The embedding model used for dense vector search
---
## Creating a Built-in Provider
Manage providers from the **Memory Providers** page in the sidebar.
1. Navigate to the **Memory Providers** page.
2. Click **Add Memory Provider**.
3. Fill in the following fields:
- **Name**: A display name for this provider.
- **Provider Type**: Select `builtin`.
4. Click **Create**.
---
## Configuring a Built-in Provider
After creating a provider, select it from the sidebar and configure its settings.
| Field | Description |
|-------|-------------|
| **Name** | The display name shown in the UI. |
| **Provider Type** | The provider implementation. Currently this is `builtin` only. |
| **Memory Model** | Optional chat model used for memory extraction and memory-related decisions. |
| **Embedding Model** | Optional embedding model used for semantic vector search. |
### Managing Providers
- **Edit**: Select a provider and update its name or model bindings.
- **Delete**: Remove a provider you no longer use.
---
## Assigning a Memory Provider to a Bot
1. Navigate to the **Bots** page and open your bot.
2. Go to the **Settings** tab.
3. Find the **Memory Provider** dropdown.
4. Select the provider you created.
5. Click **Save**.
If no memory provider is selected, the bot will not use that provider configuration in its runtime settings.
---
## Using Memory After Setup
Once a memory provider is assigned to the bot, you can manage actual memories from the bot's **Memory** tab:
- Create memories manually
- Extract memories from conversations
- Search, edit, and delete memories
- Compact or rebuild the memory store
For day-to-day memory operations, continue with [Bot Memory Management](/getting-started/memory.md).
+28
View File
@@ -0,0 +1,28 @@
# Memory Providers
Memoh uses a **Memory Provider** to define how a bot stores, retrieves, and manages long-term memory. A bot can bind one memory provider in its **Settings** tab, and that provider becomes the backend for memory extraction and memory search.
## Available Providers
Memoh currently includes the following memory provider:
- [Built-in](/memory-providers/builtin.md): The default memory system included with Memoh.
More provider types may be added in future versions, but right now `builtin` is the only supported provider type in the product and web UI.
---
## Basic Flow
1. Open the **Memory Providers** page from the sidebar.
2. Create a provider instance using one of the supported provider types.
3. Configure the provider settings.
4. Open a bot's **Settings** tab and assign that provider in **Memory Provider**.
5. Manage actual memories from the bot's **Memory** tab.
---
## Next Steps
- To configure the currently supported provider, continue with [Built-in Memory Provider](/memory-providers/builtin.md).
- To manage memory entries after the provider is assigned, see [Bot Memory Management](/getting-started/memory.md).