Voice
Core
Enhanced OpenClaw Core memory plugin β programmatic recall, self-hosted support, smart capture filtering
Install
openclaw plugins install @redplanethq/openclaw-corebrain
Configuration Example
{
"plugins": {
"entries": {
"openclaw-corebrain": {
"enabled": true,
"config": {
"apiKey": "${CORE_API_KEY}"
}
}
}
}
}
README
# openclaw-core (enhanced fork)
Long-term memory for OpenClaw powered by [Core](https://getcore.me). Automatically remembers conversations, recalls relevant context, and builds a persistent user profile.
**Fork enhancements over upstream:**
- **Programmatic recall** β searches Core automatically using the user's message and injects results as context. No fragile instructional prompts.
- **Configurable `baseUrl`** β point to Core Cloud or your own self-hosted instance.
- **Smart capture filtering** β skips housekeeping messages ("ok", "sim", "π", "HEARTBEAT_OK") to reduce noise.
- **Tunable thresholds** β `recallLimit`, `recallMinLength`, `captureMinLength` for fine-grained control.
## Install
```bash
openclaw plugins install @redplanethq/openclaw-corebrain
```
Or install from this fork directly (after building).
Restart OpenClaw after installing.
## Configuration
### Minimal (Core Cloud)
```json
{
"plugins": {
"entries": {
"openclaw-corebrain": {
"enabled": true,
"config": {
"apiKey": "${CORE_API_KEY}"
}
}
}
}
}
```
### Self-hosted Core
```json
{
"plugins": {
"entries": {
"openclaw-corebrain": {
"enabled": true,
"config": {
"apiKey": "${CORE_API_KEY}",
"baseUrl": "http://your-server:8080"
}
}
}
}
}
```
Environment variables `CORE_API_KEY` and `CORE_BASE_URL` are also supported.
## Config Reference
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `apiKey` | string | β | Core API key (required) |
| `baseUrl` | string | `https://app.getcore.me` | Core server URL. Set for self-hosted. |
| `source` | string | `openclaw_{hostname}` | Memory namespace. All channels share this tag. |
| `autoRecall` | boolean | `true` | Automatically search and inject relevant memories before every AI turn. |
| `autoCapture` | boolean | `true` | Automatically store conversation content after every turn. |
| `captureMode` | string | `"all"` | `"all"` filters short texts and injected context. `"everything"` captures all. |
| `recallLimit` | number | `5` | Max memory results to inject per turn. |
| `recallMinLength` | number | `10` | Minimum prompt length (chars) to trigger recall. |
| `captureMinLength` | number | `20` | Minimum text length (chars) to capture. |
| `debug` | boolean | `false` | Verbose debug logs. |
## How It Works
### Auto-Recall (programmatic)
Before every AI turn:
1. Takes the user's message as a search query
2. Calls Core's semantic search API directly (no prompt injection)
3. Injects results as `<relevant_memories>` context
4. On the first turn, also injects the user profile from Core
This is **programmatic** β the search happens in code, not by asking the model to search. The model receives ready-to-use context.
### Auto-Capture (with smart filtering)
After every AI turn:
1. Extracts the last user/assistant exchange
2. Removes any plugin-injected content (`<corebrain>` tags)
3. Skips housekeeping messages ("ok", "yes", "heartbeat_ok", emoji-only, etc.)
4. Skips texts shorter than `captureMinLength`
5. Sends to Core for extraction, deduplication, and long-term storage
### Tools
| Tool | Description |
|------|-------------|
| `corebrain_search` | Semantic memory search (available for model to call proactively) |
| `corebrain_get_integration_actions` | List available actions for connected integrations |
| `corebrain_execute_integration_action` | Execute integration actions (GitHub, Linear, Slack, etc.) |
### Slash Commands
| Command | Description |
|---------|-------------|
| `/search <query>` | Search memories with detailed episode info |
| `/me` | Show user information |
| `/integrations` | List connected integrations |
## Differences from Upstream
| Aspect | Upstream | This Fork |
|--------|----------|-----------|
| Recall approach | Instructional (injects prompt asking model to search) | **Programmatic** (searches in code, injects results) |
| Recall frequency | First turn only | **Every turn** |
| baseUrl | Hardcoded to Core Cloud | **Configurable** (self-hosted support) |
| Capture filtering | Length only (β₯10 chars) | **Smart** (skip patterns + configurable min length) |
| Instruction blob | ~2K tokens of "MANDATORY SEQUENCE π΄" | **Eliminated** |
## License
Same as upstream.
voice
Comments
Sign in to leave a comment