Tools
Memory Milvus
A robust, Milvus-backed long-term memory plugin for OpenClaw.
Install
openclaw plugins install @kaijchen/memory-milvus
Configuration Example
{
"plugins": {
"slots": {
"memory": "memory-milvus"
},
"entries": {
"memory-milvus": {
"enabled": true,
"config": {
"embedding": {
"apiKey": "sk-...",
"model": "text-embedding-3-small",
"baseUrl": "https://api.openai.com/v1"
},
"milvus": {
"address": "localhost:19530",
"token": "optional-token",
"username": "optional-username",
"password": "optional-password",
"collectionName": "openclaw_memories"
},
"autoRecall": true,
"autoCapture": true
}
}
}
}
}
README
# @kaijchen/memory-milvus
A robust, Milvus-backed long-term memory plugin for [OpenClaw](https://github.com/openclaw/openclaw).
This plugin provides persistent vector memory for OpenClaw agents, including features like **auto-recall** (injecting relevant memories into the context before the agent speaks) and **auto-capture** (automatically extracting and storing important information from user messages).
It uses standard OpenAI-compatible `/v1/embeddings` endpoints for vector generation, supporting models from OpenAI, Voyage AI, Mistral, Volcengine (Doubao), and any custom endpoint.
## Features
- 🧠 **Auto-Recall:** Automatically searches Milvus and injects relevant context before the agent generates a response.
- 💾 **Auto-Capture:** Analyzes user messages, automatically categorizing and storing important preferences, facts, and entities.
- 🛠️ **Memory Tools:** Provides `memory_store`, `memory_recall`, and `memory_forget` tools directly to the AI agent.
- 🔄 **Safe Model Migration:** Built-in CLI tool to safely re-embed your entire memory database to a new dimensionality if you change your embedding model.
- 🔒 **GDPR Compliant:** `memory_forget` provides the ability to selectively delete memories.
## Installation
You can install this plugin in OpenClaw using the CLI:
```bash
openclaw plugins install @kaijchen/memory-milvus
```
*Alternatively, if you are developing the plugin locally, you can link it:*
```bash
openclaw plugins install -l /path/to/openclaw-memory-milvus/dist
```
## Quickstart & Setup
After installing the plugin, run the interactive setup wizard to configure your Milvus connection and Embedding provider:
```bash
openclaw milvus setup
```
The wizard will guide you through:
1. **Embedding Provider:** Select your provider (OpenAI, Voyage AI, Volcengine, Mistral, or Custom) and API key.
2. **Milvus Connection:** Enter your Milvus host (e.g., `localhost:19530`) and authentication details.
3. **Behavior Settings:** Enable Auto-Recall and Auto-Capture.
Once the wizard completes, restart your OpenClaw gateway to apply the configuration:
```bash
openclaw gateway restart
```
## CLI Commands
This plugin registers several CLI commands under `openclaw milvus` to help you manage your agent's memory database:
- **`openclaw milvus setup`**: Run the interactive configuration wizard.
- **`openclaw milvus config`**: Display your current configuration (with masked sensitive credentials).
- **`openclaw milvus search "<query>"`**: Perform a manual semantic search against your memory collection.
- **`openclaw milvus stats`**: View total memory count and collection statistics.
- **`openclaw milvus migrate`**: Safely migrate existing memories if you change your embedding model (e.g., switching from `text-embedding-3-small` (1536 dims) to a Voyage model (1024 dims)).
## Manual Configuration (Advanced)
If you prefer to edit your `openclaw.json` config manually, you can set the following parameters under `plugins.entries.memory-milvus.config`:
```json
{
"plugins": {
"slots": {
"memory": "memory-milvus"
},
"entries": {
"memory-milvus": {
"enabled": true,
"config": {
"embedding": {
"apiKey": "sk-...",
"model": "text-embedding-3-small",
"baseUrl": "https://api.openai.com/v1"
},
"milvus": {
"address": "localhost:19530",
"token": "optional-token",
"username": "optional-username",
"password": "optional-password",
"collectionName": "openclaw_memories"
},
"autoRecall": true,
"autoCapture": true
}
}
}
}
}
```
> **Note on Authentication:** If both `token` and `username`/`password` are provided, the `token` takes precedence. If neither is provided, the plugin will attempt to connect without authentication.
## License
MIT
tools
Comments
Sign in to leave a comment