@volcengine/memory-milvus
v0.1.1
Published
Milvus-backed long-term memory plugin for OpenClaw with auto-recall/capture
Downloads
151
Maintainers
Keywords
Readme
openclaw-memory-milvus
A robust, Milvus-backed long-term memory plugin for 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, andmemory_forgettools 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_forgetprovides the ability to selectively delete memories.
Installation
You can install this plugin in OpenClaw using the CLI:
openclaw plugins install @volcengine/memory-milvusAlternatively, if you are developing the plugin locally, you can link it:
cd /path/to/openclaw-memory-milvus && npm install && npm run build
openclaw plugins install -l /path/to/openclaw-memory-milvusQuickstart & Setup
After installing the plugin, run the interactive setup wizard to configure your Milvus connection and Embedding provider:
openclaw milvus setupThe wizard will guide you through:
- Embedding Provider: Select your provider (OpenAI, Voyage AI, Volcengine, Mistral, or Custom) and API key.
- Milvus Connection: Enter your Milvus host (e.g.,
localhost:19530) and authentication details. - Behavior Settings: Enable Auto-Recall and Auto-Capture.
Once the wizard completes, restart your OpenClaw gateway to apply the configuration:
openclaw gateway restartCLI 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 fromtext-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:
{
"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
tokenandusername/passwordare provided, thetokentakes precedence. If neither is provided, the plugin will attempt to connect without authentication.
License
MIT
