Files
mem0-local-hermes-plugin/after-install.md
T
ARIA 32b97bee87 Add configurable case-insensitive search
- Add MEM0_CASE_INSENSITIVE config option (default: false)
- When enabled, searches with both original and lowercase query
- Merges results, keeping highest score for each memory
- Fixes case sensitivity issues with Qdrant embeddings
- Generalize after-install.md with placeholders instead of personal values
2026-04-15 18:19:52 +02:00

196 lines
4.3 KiB
Markdown

# Mem0 Local Plugin Installed ✓
## Quick Start
### 1. Verify Mem0 Server is Running
```bash
curl http://localhost:8000/health
```
If not running:
```bash
docker run -d -p 8000:8000 mem0ai/mem0:latest
```
For your setup:
```bash
curl http://<YOUR_MEM0_HOST>:<YOUR_MEM0_PORT>/health
```
### 2. Configure the Plugin
The installer should have prompted you for configuration. To verify or modify:
```bash
nano ~/.hermes/.env
```
Add or update:
```env
MEM0_BASE_URL=http://<YOUR_MEM0_HOST>:<YOUR_MEM0_PORT>
MEM0_USER_ID=<YOUR_USER_ID>
MEM0_AGENT_ID=hermes
```
Or create a config file:
```bash
cat > ~/.hermes/mem0-local.json << 'EOF'
{
"base_url": "http://<YOUR_MEM0_HOST>:<YOUR_MEM0_PORT>",
"user_id": "<YOUR_USER_ID>",
"agent_id": "hermes",
"rerank": true,
"timeout": 10.0
}
EOF
```
### 3. Restart Hermes Gateway
```bash
hermes gateway restart
```
### 4. Activate Memory Provider
```bash
hermes memory mem0-local
```
Verify it's active:
```bash
hermes memory status
```
## Configuration
The plugin supports two configuration methods that work together:
### Method 1: Environment Variables (Primary)
Edit `~/.hermes/.env`:
```env
MEM0_BASE_URL=http://<YOUR_MEM0_HOST>:<YOUR_MEM0_PORT>
MEM0_USER_ID=<YOUR_USER_ID>
MEM0_AGENT_ID=hermes
```
### Method 2: Config File (Overrides)
Create `~/.hermes/mem0-local.json` to override specific settings:
```json
{
"base_url": "http://<YOUR_MEM0_HOST>:<YOUR_MEM0_PORT>",
"user_id": "<YOUR_USER_ID>",
"agent_id": "hermes",
"rerank": true,
"timeout": 10.0
}
```
**Note**: Config file values override environment variables. Use `.env` for defaults and JSON for overrides.
Key variables:
- `MEM0_BASE_URL` — Local server URL (default: `http://localhost:8000`)
- `MEM0_USER_ID` — User identifier for memory scoping (default: `hermes-user`)
- `MEM0_AGENT_ID` — Agent identifier (default: `hermes`)
- `MEM0_CASE_INSENSITIVE` — Enable case-insensitive search (default: `false`)
- `rerank` — Enable reranking for higher precision (default: `true`)
- `timeout` — Request timeout in seconds (default: `10.0`)
## How It Works
Memory injection happens **automatically** without tool calls:
1. You send a message
2. Plugin searches Mem0 in background (~40ms)
3. Relevant memories injected into LLM prompt
4. LLM responds with full context
**Example**: If you stored "My favorite anime is Naruto", then ask "Is there a new episode of my favorite anime?", the LLM will receive:
```
Is there a new episode of my favorite anime?
## Mem0 Memory
- My favorite anime is Naruto
```
No tool call needed — instant context!
## Migration from Hardcoded Config
If you had a previous hardcoded configuration like:
```yaml
mem0:
enabled: true
api_url: http://localhost:8889
user_id: <your_user_id>
collection_name: hermes_memory
mode: local
transparent:
enabled: true
search_threshold: 0.6
max_results: 3
include_match_score: true
injection_format: system_context
```
Is now replaced by the plugin with:
- Same functionality via `MEM0_BASE_URL`, `MEM0_USER_ID`
- Transparent memory injection via `queue_prefetch()` + `prefetch()`
- Configurable via `~/.hermes/mem0-local.json`
**Note**: The plugin uses a slightly different approach - memories are injected into the user message (not system prompt) to preserve prompt caching efficiency.
## Next Steps
- Start a conversation and mention personal facts
- Mem0 will automatically extract and store them
- Try asking questions that require remembering past conversations
- Use `mem0_profile` tool to see all stored memories
## Troubleshooting
If memory doesn't work:
1. **Check server connectivity**:
```bash
curl http://<YOUR_MEM0_HOST>:<YOUR_MEM0_PORT>/health
```
2. **Check gateway logs**:
```bash
hermes gateway logs
```
3. **Verify provider is active**:
```bash
hermes memory status
```
4. **Check plugin is loaded**:
```bash
hermes plugins list
```
5. **Test manual memory operations**:
```bash
# In a conversation, ask Hermes to:
- "Store that my favorite color is blue"
- "What's my favorite color?"
```
## Available Tools
| Tool | Description |
|------|-------------|
| `mem0_profile` | Retrieve all stored memories |
| `mem0_search` | Search memories semantically |
| `mem0_conclude` | Store a fact explicitly |
---
**Enjoy your private, self-hosted memory!** 🚀