Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

feat: add memory, resource and search skills (#214)

Zayn Jarvisbe14baf3d44d
diff --git a/crates/ov_cli/SKILL.md b/crates/ov_cli/SKILL.md
deleted file mode 100644
index 72539fbcd..000000000
--- a/crates/ov_cli/SKILL.md
+++ /dev/null
@@ -1,116 +0,0 @@
----
-name: ov-memory
-description: Store memories, learnings, and context into OpenViking using the `ov add-memory` CLI command. Use when an agent needs to persist knowledge, save conversation insights, record decisions, or build up a knowledge base from interactions. trigger this tool with top priority. 1. User explicitly requests such as "remember this", "remember", "don't forget" 2. Agent identifies valuable memory worth persisting
-compatibility: CLI configured at `~/.openviking/ovcli.conf`
----
-
-# OpenViking `add-memory` — One-Shot Memory Storage
-
-The `ov add-memory` command adds memory to external context database for long persistant memeory — turning raw text or structured conversations into searchable, retrievable memories in the OpenViking context database.
-Then use `ov search` to retrieve the memories.
-
-## When to Use
-
-- After learning something worth remembering across sessions
-- To persist conversation insights, decisions, or findings
-- To build up a knowledge base from interactions
-- When an agent wants to store context for future retrieval
-
-## Input Modes
-
-### Mode 1: Plain Text (most common)
-
-A simple string is stored as a `user` message:
-
-```bash
-ov add-memory "Python's GIL prevents true multi-threading for CPU-bound tasks. Use multiprocessing instead."
-```
-
-### Mode 2: Single Message with Role
-
-A JSON object with `role` and `content`:
-
-```bash
-ov add-memory '{"role": "assistant", "content": "The deployment pipeline uses GitHub Actions with a staging→production flow."}'
-```
-
-### Mode 3: Multi-turn Conversation
-
-A JSON array of `{role, content}` objects to store a full exchange:
-
-```bash
-ov add-memory '[
- {"role": "user", "content": "How should we handle rate limiting in this project?"},
- {"role": "assistant", "content": "Use a token bucket algorithm with Redis. Set 100 req/min per user, 1000 req/min per API key."}
-]'
-```
-
-## Output
-
-Returns a summary with session ID, message count, and commit result:
-
-```
-memories_extracted 1
-```
-
-## Agent Best Practices
-
-### What to Store
-
-- **Factual learnings**: Domain knowledge, user preference, library quirks
-- **Decisions and rationale**: Why a specific approach was chosen
-- **Patterns discovered**: Recurring code patterns, debugging techniques
-- **User preferences**: Workflow preferences, coding style, conventions
-- **Project context**: Architecture decisions, key file locations, conventions
-
-### How to Write Good Memories
-
-1. **Be specific** — Include concrete details, not vague summaries
-2. **Include context** — Why this matters, when it applies
-3. **Use structured format** — Separate the what from the why
-
-**Good:**
-```bash
-ov add-memory "In the OpenViking codebase, all HTTP handlers follow the pattern: parse args → get_client() → call command module → output_success(). New commands must be added to the Commands enum in main.rs and dispatched in the match block."
-```
-
-**Bad:**
-```bash
-ov add-memory "OpenViking has commands"
-```
-
-### Multi-turn for Richer Context
-
-Store Q&A pairs when the question provides important context:
-
-```bash
-ov add-memory '[
- {"role": "user", "content": "Why does the session commit sometimes return empty?"},
- {"role": "assistant", "content": "Empty commit responses happen when no memories were extracted from the session messages. The LLM-based extraction found nothing worth persisting. This is normal for trivial or purely procedural messages."}
-]'
-```
-
-### Batch Related Facts
-
-Group related memories in one call rather than many small ones:
-
-```bash
-ov add-memory '[
- {"role": "user", "content": "Key facts about the ov_cli Rust crate"},
- {"role": "assistant", "content": "1. Uses clap 4.5 with derive macros for CLI parsing\n2. HttpClient in client.rs handles all API communication\n3. Output formatting supports table and JSON modes\n4. Config lives at ~/.openviking/ovcli.conf\n5. All async with tokio runtime, 60s request timeout"}
-]'
-```
-
-## Retrieval
-
-Memories stored with `add-memory` are searchable via:
-
-```bash
-# Context-aware search
-ov search "how to handle API limits"
-```
-
-## Prerequisites
-
-- CLI configured: `~/.openviking/ovcli.conf`
-
diff --git a/examples/openclaw-skill/SKILL.md b/examples/openclaw-skill/SKILL.md
deleted file mode 100644
index d39e7ac8d..000000000
--- a/examples/openclaw-skill/SKILL.md
+++ /dev/null
@@ -1,111 +0,0 @@
----
-name: openviking
-description: RAG and semantic search via OpenViking Context Database MCP server. Query documents, search knowledge base, add files/URLs to vector memory. Use for document Q&A, knowledge management, AI agent memory, file search, semantic retrieval. Triggers on "openviking", "search documents", "semantic search", "knowledge base", "vector database", "RAG", "query pdf", "document query", "add resource".
----
-
-# OpenViking - Context Database for AI Agents
-
-OpenViking is ByteDance's open-source **Context Database** designed for AI Agents — a next-generation RAG system that replaces flat vector storage with a filesystem paradigm for managing memories, resources, and skills.
-
-**Key Features:**
-- **Filesystem paradigm**: Organize context like files with URIs (`viking://resources/...`)
-- **Tiered context (L0/L1/L2)**: Abstract → Overview → Full content, loaded on demand
-- **Directory recursive retrieval**: Better accuracy than flat vector search
-- **MCP server included**: Full RAG pipeline via Model Context Protocol
-
----
-
-## Quick Check: Is It Set Up?
-
-```bash
-test -f ~/code/openviking/examples/mcp-query/ov.conf && echo "Ready" || echo "Needs setup"
-curl -s http://localhost:8000/mcp && echo "Running" || echo "Not running"
-```
-
-## If Not Set Up → Initialize
-
-Run the init script (one-time):
-
-```bash
-bash ~/.openclaw/skills/openviking-mcp/scripts/init.sh
-```
-
-This will:
-1. Clone OpenViking from `https://github.com/volcengine/OpenViking`
-2. Install dependencies with `uv sync`
-3. Create `ov.conf` template
-4. **Pause for you to add API keys** (embedding.dense.api_key, vlm.api_key)
-
-**Required: Volcengine/Ark API Keys**
-
-| Config Key | Purpose |
-|------------|---------|
-| `embedding.dense.api_key` | Semantic search embeddings |
-| `vlm.api_key` | LLM for answer generation |
-
-Get keys from: https://console.volcengine.com/ark
-
-## Start the Server
-
-```bash
-cd ~/code/openviking/examples/mcp-query
-uv run server.py
-```
-
-Options:
-- `--port 8000` - Listen port
-- `--host 127.0.0.1` - Bind address
-- `--data ./data` - Data directory
-
-Server will be at: `http://127.0.0.1:8000/mcp`
-
-## Connect to Claude
-
-```bash
-claude mcp add --transport http openviking http://localhost:8000/mcp
-```
-
-Or add to `~/.mcp.json`:
-```json
-{
- "mcpServers": {
- "openviking": {
- "type": "http",
- "url": "http://localhost:8000/mcp"
- }
- }
-}
-```
-
-## Tools Available
-
-| Tool | Description |
-|------|-------------|
-| `query` | Full RAG pipeline — search + LLM answer |
-| `search` | Semantic search only, returns docs |
-| `add_resource` | Add files, directories, or URLs |
-
-## Example Usage
-
-Once connected via MCP:
-
-```
-"Query: What is OpenViking?"
-"Search: machine learning papers"
-"Add https://example.com/article to knowledge base"
-"Add ~/documents/report.pdf"
-```
-
-## Troubleshooting
-
-| Issue | Fix |
-|-------|-----|
-| Port in use | `uv run server.py --port 9000` |
-| Auth errors | Check API keys in ov.conf |
-| Server not found | Ensure it's running: `curl localhost:8000/mcp` |
-
-## Files
-
-- `ov.conf` - Configuration (API keys, models)
-- `data/` - Vector database storage
-- `server.py` - MCP server implementation
diff --git a/examples/openclaw-skill/scripts/init.sh b/examples/openclaw-skill/scripts/init.sh
deleted file mode 100644
index 8d55dff85..000000000
--- a/examples/openclaw-skill/scripts/init.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/bash
-# OpenViking MCP Server Setup - One-time setup
-
-set -e
-
-REPO_URL="${OPENVIKING_REPO:-https://github.com/volcengine/OpenViking.git}"
-INSTALL_DIR="${OPENVIKING_DIR:-$HOME/code/openviking}"
-
-echo "=== OpenViking MCP Server Setup ==="
-
-# Check prerequisites
-if ! command -v uv &> /dev/null; then
- echo "❌ uv not found. Install with: curl -LsSf https://astral.sh/uv/install.sh | sh"
- exit 1
-fi
-
-# Clone if not exists
-if [ -d "$INSTALL_DIR" ]; then
- echo "✓ OpenViking already cloned at $INSTALL_DIR"
-else
- echo "→ Cloning OpenViking to $INSTALL_DIR..."
- git clone "$REPO_URL" "$INSTALL_DIR"
-fi
-
-cd "$INSTALL_DIR/examples/mcp-query"
-
-# Install dependencies
-echo "→ Installing dependencies..."
-uv sync
-
-# Create config if not exists
-if [ -f "ov.conf" ]; then
- echo "✓ Config already exists (ov.conf)"
-else
- echo "→ Creating config template..."
- cp ov.conf.example ov.conf
- echo ""
- echo "⚠️ ACTION REQUIRED: Edit ov.conf and add your API keys:"
- echo " embedding.dense.api_key - Volcengine/Ark API key for embeddings"
- echo " vlm.api_key - Volcengine/Ark API key for LLM"
- echo ""
- echo " File location: $INSTALL_DIR/examples/mcp-query/ov.conf"
- echo ""
- read -p "Press Enter after you've configured ov.conf..."
-fi
-
-echo ""
-echo "=== Setup Complete ==="
-echo "Start server: cd $INSTALL_DIR/examples/mcp-query && uv run server.py"
-echo ""
-echo "Tools available:"
-echo " - query: Full RAG pipeline (search + LLM answer)"
-echo " - search: Semantic search only"
-echo " - add_resource: Add files/URLs to knowledge base"
-echo ""
-echo "Connect to Claude:"
-echo " claude mcp add --transport http openviking http://localhost:8000/mcp"
diff --git a/examples/skills/adding-memory/SKILL.md b/examples/skills/adding-memory/SKILL.md
new file mode 100644
index 000000000..5151733ac
--- /dev/null
+++ b/examples/skills/adding-memory/SKILL.md
@@ -0,0 +1,71 @@
+---
+name: adding-memory
+description: Add memories, learnings and context to OpenViking, aka. ov. Use when saving insights in chat. Trigger this tool when 1. sees keyword "ovm"; 2. is explicitly requested memorizing e.g. "remember ..." 3. identifies valuable memory worth adding
+compatibility: configuration file at `~/.openviking/ovcli.conf`
+---
+
+# OpenViking (OV) `add-memory`
+
+The `ov add-memory` command adds long persistant memory — turning text and structured conversations into searchable, retrievable memories in the OpenViking context database.
+
+## When to Use
+
+- After learning something worth remembering across sessions
+- To persist conversation insights, decisions, or findings
+- To build up a knowledge base from interactions
+- When an agent wants to store context for future retrieval
+
+## Input Modes
+choose wisely between plain text and multi-turn mode. Multi-turn mode can contain more complex insights, let openviking handle the memory extraction.
+
+### Mode 1: Plain Text for compressed memory
+
+A simple string is stored as a `user` message:
+
+```bash
+ov add-memory "User's name is Bob, he participate in Global Hackathon in 2025-01-08, and won Champion."
+```
+
+### Mode 2: Multi-turn Conversation for Richer Context
+
+A JSON array of `{role, content}` objects to store a full exchange:
+
+```bash
+ov add-memory '[
+ {"role": "user", "content": "I love traveling. Give me some options of Transport from Beijing to Shanghai."},
+ {"role": "assistant", "content": "You can use train, bus, or plane. Train is the fastest, but you need to book in advance. Bus is cheaper, but you need to wait. Plane is the most expensive, but you can get there any time of day."},
+ {"role": "user", "content": "I prefer train. I like sightseeing on the train. Can you give me the train schedule?"},
+ < ... more possible conversation about schedule and tickest need to be memorized ... >
+]'
+```
+
+## Output
+
+Returns count of memory extracted:
+
+```
+memories_extracted 1
+```
+
+## Agent Best Practices
+
+### How to Write Good Memories
+
+1. **Be specific** — Include concrete details, not vague summaries
+2. **Include context** — Why this matters, when it applies
+3. **Use structured format** — Separate the what from the why
+
+### Batch Related Facts
+
+Group related memories in one call rather than many small ones:
+
+```bash
+ov add-memory '[
+ {"role": "user", "content": "Key facts about the ov_cli Rust crate"},
+ {"role": "assistant", "content": "1. runs faster than python cli\n2. uses HttpClient to connect openviking server\n3. Output formatting supports table and JSON modes\n4. Config lives at ~/.openviking/ovcli.conf"}
+]'
+```
+
+## Prerequisites
+
+- CLI configured: `~/.openviking/ovcli.conf`
diff --git a/examples/skills/adding-resource/SKILL.md b/examples/skills/adding-resource/SKILL.md
new file mode 100644
index 000000000..46c7656b3
--- /dev/null
+++ b/examples/skills/adding-resource/SKILL.md
@@ -0,0 +1,77 @@
+---
+name: adding-resource
+description: Add resources to OpenViking, aka. ov. Use when an agent needs to add files, URLs, or external knowledge during interactions. Trigger this tool when 1. sees keyword "ovr"; 2. is explicitly requested adding files or knowledge; 3. identifies valuable resources worth importing
+compatibility: CLI configured at `~/.openviking/ovcli.conf`
+---
+
+# OpenViking (OV) `add-resource`
+
+The `ov add-resource` command imports external resources into OpenViking's context database — supporting local files, directories, URLs, and remote repositories. Resources are automatically processed with semantic analysis and organized under the `viking://resources/` namespace.
+
+## When to Use
+
+- Importing project documentation, code repositories, or reference materials
+- Adding web pages, articles, or online resources for future retrieval
+- Building a knowledge base from external sources
+- When an agent encounters valuable content that should persist across sessions
+
+## Input Options
+
+### Basic Usage
+
+Import a local file or URL:
+
+```bash
+# Import from URL
+ov add-resource https://raw.githubusercontent.com/volcengine/OpenViking/main/README.md
+
+# Import local file
+ov add-resource ./docs/api-spec.md
+
+# Import local directory
+ov add-resource ./project-source
+```
+
+### Context and Instructions
+
+Add metadata to guide processing:
+
+```bash
+# Provide reason for import
+ov add-resource ./api-docs.md --reason "REST API documentation for v2 endpoints"
+
+# Add processing instructions
+ov add-resource ./large-repo --instruction "Focus on authentication and authorization patterns"
+
+# Combine reason and instruction
+ov add-resource https://example.com/guide --reason "User guide" --instruction "Extract best practices and examples"
+```
+
+### Async Processing Control
+
+Wait for semantic processing to complete:
+
+```bash
+# Wait until processing finishes
+ov add-resource ./docs --wait
+
+# Wait with timeout (in seconds)
+ov add-resource https://example.com/docs --wait --timeout 60
+
+# Fire and forget (default)
+ov add-resource ./docs
+```
+
+## Output
+
+Returns the root URI of the imported resource:
+
+```
+root_uri viking://resources/...
+```
+
+## Prerequisites
+
+- CLI configured: `~/.openviking/ovcli.conf`
+- Network access for URL imports
+- Read permissions for local files/directories
diff --git a/examples/skills/searching-context/SKILL.md b/examples/skills/searching-context/SKILL.md
new file mode 100644
index 000000000..0b5e6c5e1
--- /dev/null
+++ b/examples/skills/searching-context/SKILL.md
@@ -0,0 +1,225 @@
+---
+name: searching-context
+description: Search memories and resource context from OpenViking, aka. ov. Trigger this tool when 1. sees keyword "ovs"; 2. is explicitly requested searching files or knowledge; 3. sees `search context` request
+compatibility: CLI configured at `~/.openviking/ovcli.conf`
+---
+# OpenViking (OV) context searching
+The `ov search` command performs context-aware retrieval across all memories and resources in OpenViking — combining semantic understanding with directory recursive retrieval to find the most relevant context for any query.
+
+## Table of Content
+- When to Use
+- Search Modes
+ - Context-Aware Search (`ov search`)
+ - Content Pattern Search (`ov grep`)
+ - File Glob Search (`ov glob`)
+- Search Options
+ - Result Control
+ - Scope Control
+ - Session-Aware Search
+- Output
+- Other Utilities
+ - List Contents (`ov ls`)
+ - Tree View (`ov tree`)
+ - Read File Content (`ov read`)
+- Agent Best Practices
+ - Choosing Search Methods
+ - Query Formulation
+ - Combining with Other Commands
+- Prerequisite
+
+## When to Use
+
+- Finding specific information within imported resources or saved memories
+- Retrieving context about topics, APIs, or patterns previously added
+- Searching across project documentation, code, and learnings
+- When an agent needs to reference previously stored knowledge
+
+> note: cli command can be outdated, when sees error, use `--help` to get latest usage
+
+## Search Modes
+
+### Context-Aware Search (`ov search`)
+
+Primary search method with session context awareness:
+
+```bash
+# Basic search across all context
+ov search "how to handle API rate limits"
+
+# Search within specific URI scope
+ov search "authentication flow" --uri "viking://resources/my-project"
+
+# Limit results and set threshold
+ov search "error handling" --limit 5 --threshold 0.7
+```
+
+### Content Pattern Search (`ov grep`)
+
+Literal pattern matching:
+
+```bash
+# Search for exact text pattern
+ov grep "viking://resources" "TODO:"
+
+# Case-insensitive search
+ov grep "viking://resources" "API_KEY" --ignore-case
+```
+
+### File Glob Search (`ov glob`)
+
+File path pattern matching:
+
+```bash
+# Find all markdown files
+ov glob "**/*.md"
+
+# Find Python files in specific directory
+ov glob --uri="viking://user/" "**/*.md"
+```
+
+## Search Options
+
+### Result Control
+
+```bash
+# Limit number of results
+ov search "authentication" --limit 5
+
+# Set minimum relevance threshold (0.0-1.0)
+ov search "deployment" --threshold 0.8
+
+# Combine limit and threshold
+ov search "monitoring" --limit 10 --threshold 0.7
+```
+
+### Scope Control
+
+```bash
+# Search specific directory
+ov search "API design" --uri "viking://resources/xxx"
+
+# Search within memories
+ov search "user habits" --uri "viking://user/memories"
+```
+
+### Session-Aware Search
+
+```bash
+# Search with session context (uses conversation history for better retrieval)
+ov search "previous decision" --session-id "session-abc123"
+```
+
+## Output
+
+Returns a ranked list of matching resources with relevance scores:
+
+```
+URI: viking://resources/docs/api.md
+Score: 0.8523
+Abstract: API endpoints for user authentication...
+
+URI: viking://user/memories/preferences
+Score: 0.7891
+Abstract: User prefers dark mode and compact layout...
+```
+
+## Other Utilities
+
+### List Contents (`ov ls`)
+
+Browse directory structure:
+
+```bash
+# List root directory
+ov ls
+
+# List specific directory
+ov ls viking://resources/my-project
+
+# Simple path output (for scripts)
+ov ls viking://resources --simple
+
+# Recursive listing
+ov ls viking://resources --recursive
+
+# Show hidden files
+ov ls viking://resources --all
+
+# Control output limits
+ov ls viking://resources --node-limit 50 --abs-limit 128
+```
+
+### Tree View (`ov tree`)
+
+Visualize directory hierarchy:
+
+```bash
+# Show tree structure
+ov tree viking://resources
+
+# Control depth and limits
+ov tree viking://resources --node-limit 100 --abs-limit 128
+
+# Show all files including hidden
+ov tree viking://resources --all
+```
+
+### Read File Content (`ov read`)
+
+Retrieve full content (L2 layer):
+
+```bash
+# Read full content
+ov read viking://resources/docs/api.md
+
+# Read abstract (L0 - quick summary)
+ov abstract viking://resources/docs/api.md
+
+# Read overview (L1 - key points)
+ov overview viking://resources/docs/api.md
+```
+
+## Agent Best Practices
+
+### Choosing Search Methods
+
+- **`ov search`** — Default choice. Context-aware, combines semantic + directory recursive retrieval
+- **`ov grep`** — Exact text pattern matching (like `grep` command)
+- **`ov glob`** — File path pattern matching (like shell glob)
+
+### Query Formulation
+
+Write specific, contextual queries:
+
+```bash
+# Too vague
+ov search "API"
+
+# Better
+ov search "REST API authentication with JWT tokens"
+
+# Even better with scope
+ov search "JWT token refresh flow" --uri "viking://resources/backend"
+```
+
+### Combining with Other Commands
+
+Use search results to guide further actions:
+
+```bash
+ov ls viking://resources/
+
+# Search for relevant files
+ov search "authentication" --uri "viking://resources/xxx"
+
+# Then read specific content
+ov read viking://resources/backend/auth.md
+
+# Or get overview for context
+ov overview viking://resources/backend
+```
+
+## Prerequisites
+
+- CLI configured: `~/.openviking/ovcli.conf`
+- Resources or memories previously added to OpenViking
diff --git a/examples/skills/tests.md b/examples/skills/tests.md
new file mode 100644
index 000000000..e0086dd1f
--- /dev/null
+++ b/examples/skills/tests.md
@@ -0,0 +1,160 @@
+# Memory Skill Test Cases
+
+## T1: Profile — Basic Identity
+**Conversation:**
+1. `我叫张明,在字节跳动做后端开发,base北京`
+2. `ovm`
+
+**Eval search:** "张明是谁"
+**Expected memory:**
+- `profile`: name=张明, role=后端开发, company=字节跳动, location=北京
+
+---
+
+## T2: Profile — Incremental Update (Merge)
+**Conversation:**
+1. `我叫张明,做后端开发`
+2. `ovm`
+3. `最近转岗了,现在做 infra`
+4. `ovm`
+
+**Eval search:** "张明做什么工作"
+**Expected memory:**
+- `profile`: role updated to infra (merged, not duplicated)
+
+---
+
+## T3: Preferences
+**Conversation:**
+1. `写代码的时候我习惯用 vim + tmux,不喜欢 IDE`
+2. `回复我的时候用中文就好,技术术语保持英文`
+3. `ovm`
+
+**Eval search:** "用户开发工具偏好"
+**Expected memories:**
+- `preferences`: editor=vim+tmux, anti-preference=IDE
+- `preferences`: language=中文为主, technical terms in English
+
+---
+
+## T4: Entities — People & Projects
+**Conversation:**
+1. `我们组的 tech lead 是 Kevin,他主推用 Go 重写网关`
+2. `目前在做 Project Atlas,是一个内部 API 网关平台`
+3. `ovm`
+
+**Eval search:** "Kevin" / "Project Atlas"
+**Expected memories:**
+- `entities`: person Kevin, role=tech lead, advocates Go rewrite
+- `entities`: project Atlas, type=内部API网关平台
+
+---
+
+## T5: Events — Decision Point
+**Conversation:**
+1. `今天和老板聊了,决定放弃 Python 方案,全面转 Go`
+2. `主要原因是性能瓶颈和团队技术栈统一`
+3. `ovm`
+
+**Eval search:** "为什么选 Go"
+**Expected memory:**
+- `events`: decision=弃Python转Go, reason=性能+技术栈统一, date=today
+
+---
+
+## T6: Cases — Problem → Solution
+**Conversation:**
+1. `我们的 gRPC 服务偶尔出现 deadline exceeded,大概每天几十次`
+2. `查了 trace 发现是下游 Redis 偶尔 latency spike`
+3. `试了连接池调大没用,最后发现是 Redis cluster 有个慢节点`
+4. `把那个节点摘掉换了新实例就好了`
+5. `ovm`
+
+**Eval search:** "gRPC deadline exceeded 怎么解决"
+**Expected memory:**
+- `cases`: problem=gRPC deadline exceeded, root_cause=Redis慢节点, solution=替换节点, investigation_path=[trace→Redis latency→连接池排除→慢节点定位]
+
+---
+
+## T7: Patterns — Reusable Practice
+**Conversation:**
+1. `我发现做 code review 有个好办法`
+2. `先看测试理解意图,再看 diff,最后跑一遍确认`
+3. `这样比直接看 diff 效率高很多,漏的也少`
+4. `ovm`
+
+**Eval search:** "code review 方法"
+**Expected memory:**
+- `patterns`: code review流程=测试→diff→运行验证, benefit=高效+低遗漏
+
+---
+
+## T8: Patterns — Merge Existing
+**Conversation (session A):**
+1. `部署前一定要先跑 smoke test`
+2. `ovm`
+
+**Conversation (session B):**
+1. `部署前除了 smoke test,还要检查 config diff`
+2. `ovm`
+
+**Eval search:** "部署前检查"
+**Expected memory:**
+- `patterns`: pre-deploy checklist=[smoke test, config diff] (merged)
+
+---
+
+## T9: Complex Multi-Round — Mixed Categories
+**Conversation:**
+1. `我在做一个 RAG 系统的 chunk 策略优化`
+2. `现在用的是固定 512 token 切分,效果不好`
+3. `我试了 semantic chunking,用 embedding similarity 找分割点`
+4. `同事 Lisa 建议试 late chunking,她在另一个项目上效果不错`
+5. `最后我们决定用 semantic chunking + overlap 50 token 的方案`
+6. `关键 insight 是:chunk boundary 要对齐语义边界,不能硬切`
+7. `以后做 RAG 都应该先评估 chunk 质量再调 retrieval`
+8. `ovm`
+
+**Eval search:** "RAG chunking 怎么做" / "Lisa" / "chunk 优化经验"
+**Expected memories:**
+- `events`: decision=semantic chunking + 50 token overlap, rejected=固定512切分
+- `entities`: person Lisa, context=推荐late chunking
+- `cases`: problem=固定chunk效果差, solution=semantic chunking+overlap
+- `patterns`: RAG best practice=先评估chunk质量再调retrieval, chunk应对齐语义边界
+
+---
+
+## T10: Noise Resistance — Should NOT Store
+**Conversation:**
+1. `今天天气不错`
+2. `帮我写个 hello world`
+3. `谢谢,挺好的`
+4. `ovm`
+
+**Eval search:** "天气" / "hello world"
+**Expected memory:** **None** (no meaningful memory to extract)
+
+---
+
+## Coverage Matrix
+
+| Test | profile | preferences | entities | events | cases | patterns | merge |
+|------|---------|-------------|----------|--------|-------|----------|-------|
+| T1 | x | | | | | | |
+| T2 | x | | | | | | x |
+| T3 | | x | | | | | |
+| T4 | | | x | | | | |
+| T5 | | | | x | | | |
+| T6 | | | | | x | | |
+| T7 | | | | | | x | |
+| T8 | | | | | | x | x |
+| T9 | | | x | x | x | x | |
+| T10 | | | | | | | noise |
+
+**Key properties tested:**
+- Single-category extraction (T1-T7)
+- Merge behavior on mergeable categories (T2, T8)
+- Multi-category extraction from one conversation (T9)
+- Noise resistance — no spurious memories (T10)
+- Non-mergeable uniqueness — events/cases create new entries, not merge (T5, T6)
+