mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
docs: add concepts
This commit is contained in:
@@ -56,6 +56,55 @@ export default defineConfig({
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Concepts',
|
||||
items: [
|
||||
{
|
||||
text: 'Overview',
|
||||
link: '/concepts/index.md'
|
||||
},
|
||||
{
|
||||
text: 'Bot',
|
||||
link: '/concepts/bot.md'
|
||||
},
|
||||
{
|
||||
text: 'Provider and Model',
|
||||
link: '/concepts/provider-and-model.md'
|
||||
},
|
||||
{
|
||||
text: 'Schedule',
|
||||
link: '/concepts/schedule.md'
|
||||
},
|
||||
{
|
||||
text: 'Memory',
|
||||
link: '/concepts/memory.md'
|
||||
},
|
||||
{
|
||||
text: 'Channel',
|
||||
link: '/concepts/channel.md'
|
||||
},
|
||||
{
|
||||
text: 'Container',
|
||||
link: '/concepts/container.md'
|
||||
},
|
||||
{
|
||||
text: 'MCP',
|
||||
link: '/concepts/mcp.md'
|
||||
},
|
||||
{
|
||||
text: 'Subagents',
|
||||
link: '/concepts/subagents.md'
|
||||
},
|
||||
{
|
||||
text: 'Skills',
|
||||
link: '/concepts/skills.md'
|
||||
},
|
||||
{
|
||||
text: 'Conversation and History',
|
||||
link: '/concepts/conversation-and-history.md'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'CLI',
|
||||
items: [
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# Bot
|
||||
|
||||
A **bot** is the primary runtime entity in Memoh.
|
||||
|
||||
Each bot has its own:
|
||||
|
||||
- Configuration
|
||||
- Container lifecycle
|
||||
- Memory scope
|
||||
- Channel bindings
|
||||
- Model assignments
|
||||
|
||||
## Key Settings
|
||||
|
||||
- **max-load-time** (`max_context_load_time`): how many minutes of recent conversation context are loaded into prompts
|
||||
- **language**: preferred language for interaction (default is `auto`)
|
||||
- **chat model / memory model / embedding model**: model IDs used by this bot
|
||||
|
||||
## Why It Matters
|
||||
|
||||
The bot abstraction allows Memoh to isolate behavior and resources per agent, while keeping management centralized in one Web UI.
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Bots > Select a bot > Settings`
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# Channel
|
||||
|
||||
A **channel** connects a bot to an external communication platform.
|
||||
|
||||
Examples include:
|
||||
|
||||
- Telegram
|
||||
- Feishu (Lark)
|
||||
- Web chat
|
||||
|
||||
## What a Channel Configuration Defines
|
||||
|
||||
- Platform type and credentials
|
||||
- Message routing from external users to a target bot
|
||||
- Reply delivery back to the source platform
|
||||
|
||||
## Why It Matters
|
||||
|
||||
Channels decouple bot logic from transport, so one bot can serve users across multiple platforms.
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Bots > Select a bot > Channels`
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Container
|
||||
|
||||
Each bot runs in its own **isolated container**.
|
||||
|
||||
## What Isolation Gives You
|
||||
|
||||
- Separate filesystem per bot
|
||||
- Separate runtime process space
|
||||
- Controlled lifecycle (create/start/stop/delete)
|
||||
|
||||
This prevents one bot from interfering with another bot's execution environment.
|
||||
|
||||
## Why It Matters
|
||||
|
||||
Container isolation is the foundation that allows bots to run tools, commands, and file operations safely in parallel.
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Bots > Select a bot > Container`
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Conversation and History
|
||||
|
||||
Memoh organizes interactions as **conversations** with preserved **history**.
|
||||
|
||||
## What This Includes
|
||||
|
||||
- Ongoing chat context between users and bots
|
||||
- Message-level timeline and traceability
|
||||
- Source context for memory extraction and debugging
|
||||
|
||||
## Why It Matters
|
||||
|
||||
Conversation history powers:
|
||||
|
||||
- Better response continuity
|
||||
- Auditing and troubleshooting
|
||||
- Post-hoc analysis of bot behavior
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Chat > Select conversation`
|
||||
- `Bots > Select a bot > History`
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Concepts Overview
|
||||
|
||||
This section explains the core design concepts behind Memoh.
|
||||
|
||||
Use these pages when you want to understand how Memoh is designed, why features exist, and how different parts work together.
|
||||
|
||||
## Concept Map
|
||||
|
||||
- **Bot**: the core runtime unit
|
||||
- **Provider and Model**: how LLM capability is plugged in
|
||||
- **Memory**: how long-term knowledge is stored and retrieved
|
||||
- **Channel**: how external platforms connect to bots
|
||||
- **Schedule**: how tasks are triggered automatically
|
||||
- **Container**: isolated execution environment per bot
|
||||
- **MCP**: external tool and service integration protocol
|
||||
- **Subagents**: specialized delegated agents
|
||||
- **Skills**: reusable capability prompts/instructions
|
||||
- **Conversation and History**: chat context and traceability
|
||||
|
||||
## Recommended Reading Order
|
||||
|
||||
1. [Bot](/concepts/bot.md)
|
||||
2. [Provider and Model](/concepts/provider-and-model.md)
|
||||
3. [Memory](/concepts/memory.md)
|
||||
4. [Channel](/concepts/channel.md)
|
||||
5. [Container](/concepts/container.md)
|
||||
6. [Schedule](/concepts/schedule.md)
|
||||
7. [MCP](/concepts/mcp.md)
|
||||
8. [Subagents](/concepts/subagents.md)
|
||||
9. [Skills](/concepts/skills.md)
|
||||
10. [Conversation and History](/concepts/conversation-and-history.md)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# MCP
|
||||
|
||||
**MCP (Model Context Protocol)** connects Memoh bots to external tool services.
|
||||
|
||||
## What MCP Adds
|
||||
|
||||
- Standardized tool discovery and invocation
|
||||
- Remote capability extension without changing core bot code
|
||||
- Per-bot integration flexibility
|
||||
|
||||
Memoh supports MCP connections so bots can access external systems through a unified protocol.
|
||||
|
||||
## Why It Matters
|
||||
|
||||
MCP makes capability extension modular. You can add or swap tool backends with minimal coupling.
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Bots > Select a bot > MCP`
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Memory
|
||||
|
||||
**Memory** is Memoh's long-term knowledge system for each bot.
|
||||
|
||||
## How It Works
|
||||
|
||||
- Important facts are extracted from conversations
|
||||
- Memories are stored and indexed
|
||||
- Relevant memories are retrieved by semantic similarity when needed
|
||||
|
||||
Memoh combines vector retrieval with keyword-style retrieval for better recall and precision.
|
||||
|
||||
## Why It Matters
|
||||
|
||||
Memory enables continuity across long timelines, so bots can maintain context beyond short prompt windows.
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Bots > Select a bot > Memory`
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Provider and Model
|
||||
|
||||
In Memoh, **provider** and **model** are separate but connected concepts:
|
||||
|
||||
- A **provider** is the LLM service configuration (API endpoint, key, client type)
|
||||
- A **model** is the concrete chat or embedding model under that provider
|
||||
|
||||
## Typical Setup
|
||||
|
||||
At minimum, a production-ready bot usually needs:
|
||||
|
||||
- One **chat** model for dialog generation
|
||||
- One **embedding** model for memory indexing and retrieval
|
||||
|
||||
## Model Assignment to Bot
|
||||
|
||||
Bots reference model IDs in settings:
|
||||
|
||||
- `chat_model_id`
|
||||
- `memory_model_id`
|
||||
- `embedding_model_id`
|
||||
|
||||
This enables per-bot customization (for quality, latency, or cost).
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Models > Add Provider > Select Provider > Add Model`
|
||||
- `Bots > Select a bot > Settings > Choose chat/memory/embedding models`
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Schedule
|
||||
|
||||
A **schedule** is a cron-based automation rule that runs bot commands at defined times.
|
||||
|
||||
## Core Fields
|
||||
|
||||
- `pattern`: cron expression
|
||||
- `command`: command or task to execute
|
||||
- `enabled`: whether the schedule is active
|
||||
- `max_calls`: optional execution cap
|
||||
- `current_calls`: current run count
|
||||
|
||||
## Why It Matters
|
||||
|
||||
Schedules make bots proactive, not only reactive.
|
||||
You can automate recurring operations like summaries, reminders, checks, and maintenance tasks.
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Not available in current Web UI`
|
||||
|
||||
> Schedule is supported by backend and CLI/API, but there is currently no dedicated schedule page in the Web UI.
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Skills
|
||||
|
||||
**Skills** are reusable capability instructions that guide how a bot (or subagent) solves specific classes of tasks.
|
||||
|
||||
## Typical Skill Content
|
||||
|
||||
- Scope and purpose
|
||||
- Input expectations
|
||||
- Execution steps
|
||||
- Constraints and output format
|
||||
|
||||
## Why It Matters
|
||||
|
||||
Skills help keep behavior consistent, reduce prompt duplication, and make complex workflows easier to maintain.
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Bots > Select a bot > Subagents`
|
||||
|
||||
> Skills are currently primarily managed through agent/workspace configuration and runtime conventions, while subagent-related behavior is visible from the Subagents area.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Subagents
|
||||
|
||||
**Subagents** are specialized helper agents that a bot can delegate tasks to.
|
||||
|
||||
## Core Idea
|
||||
|
||||
- The main bot acts as coordinator
|
||||
- Subagents focus on narrower tasks
|
||||
- Results are combined back into the main workflow
|
||||
|
||||
This supports decomposition of complex requests into smaller, more reliable execution units.
|
||||
|
||||
## Why It Matters
|
||||
|
||||
Subagent architecture improves scalability for multi-step tasks and helps separate responsibilities by role.
|
||||
|
||||
## Web UI Path
|
||||
|
||||
- `Bots > Select a bot > Subagents`
|
||||
|
||||
Reference in New Issue
Block a user