cortex
Local-first agent memory with Ebbinghaus decay, hybrid search, and MCP tools. Import files, extract facts, search with BM25 + semantic, track confidence over time. Zero dependencies, single Go binary, SQLite storage. Use when you need persistent memory beyond OpenClaw's built-in MEMORY.md — especially for multi-agent setups, large knowledge bases, or when compaction keeps losing your important context. Don't use for: conversation history (use memory_search), exact string matching (use ripgrep), or web lookups.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/hurttlocker/hurttlocker-cortexCortex — Local-First Agent Memory
The memory layer OpenClaw should have built in.
Cortex is an open-source, import-first memory system for AI agents. Single Go binary, SQLite storage, zero cloud dependencies. It solves the #1 complaint about OpenClaw: agents forget everything after compaction.
GitHub: https://github.com/hurttlocker/cortex
Install: brew install hurttlocker/cortex/cortex or download from Releases
Why Cortex?
OpenClaw's default memory is Markdown files. When context fills up, compaction summarizes and destroys specifics. Cortex fixes this:
| Problem | Cortex Solution |
|---|---|
| Compaction loses details | Persistent SQLite DB survives any session |
| No search — just dump files into context | Hybrid BM25 + semantic search (~16ms keyword, ~52ms semantic) |
| Everything has equal weight | Ebbinghaus decay — important facts stay, noise fades naturally |
| Can't import existing files | Import-first: Markdown, text, any file. 8 connectors (GitHub, Gmail, Calendar, Drive, Slack, Notion, Discord, Telegram) |
| Multi-agent memory leaks | Per-agent scoping built in |
| Expensive cloud memory services | $0/month. Forever. Local SQLite. |
Quick Start
1. Install Cortex
# macOS/Linux (Homebrew)
brew install hurttlocker/cortex/cortex
# Or download binary directly
# https://github.com/hurttlocker/cortex/releases/latest
2. Import Your Memory
# Import OpenClaw's memory files
cortex import ~/clawd/memory/ --extract
# Import specific files
cortex import ~/clawd/MEMORY.md --extract
cortex import ~/clawd/USER.md --extract
3. Search
# Fast keyword search
cortex search "wedding venue" --limit 5
# Semantic search (requires ollama with nomic-embed-text)
cortex search "what decisions did I make about the project" --mode semantic
# Hybrid (recommended)
cortex search "trading strategy" --mode hybrid
4. Use as MCP Server (recommended for OpenClaw)
# Add to your MCP config — Cortex exposes 17 tools + 4 resources
cortex mcp # stdio mode
cortex mcp --port 8080 # HTTP+SSE mode
Key Features
Ebbinghaus Forgetting Curve
Facts decay at different rates based on type. Identity facts (names, roles) last ~2 years. Temporal facts (events, dates) fade in ~1 week. State facts (status, mood) fade in ~2 weeks. This means search results naturally prioritize what matters — without manual curation.
Hybrid Search
- BM25 — instant keyword matching via SQLite FTS5 (~16ms)
- Semantic — meaning-based via local embeddings (~52ms)
- Hybrid — combines both with reciprocal rank fusion
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-hurttlocker-hurttlocker-cortex": {
"enabled": true,
"auto_update": true
}
}
}