match_seeds() previously only found nodes whose keys exactly matched search terms. This meant searches like "formal verification" or "bcachefs plan" returned nothing — no nodes are keyed with those exact strings. Three-tier matching strategy: 1. Exact key match (full weight) — unchanged 2. Key component match (0.5× weight) — split keys on -/_/./#, match individual words. "plan" now finds "the-plan", "verification" finds "c-to-rust-verification-workflow", etc. 3. Content match (0.2× weight, capped at 50 hits) — search node content for terms that didn't match any key. Catches nodes whose keys are opaque but whose content is relevant. Also adds prompt-based seeding to the hook pipeline: extract_query_terms from the user's prompt and merge into the term set. Previously the hook only seeded from transcript scanning (finding node keys as substrings in conversation history), which meant fresh sessions or queries about new topics produced no search results at all. |
||
|---|---|---|
| .cargo | ||
| .claude | ||
| doc | ||
| docs | ||
| poc-daemon | ||
| poc-memory | ||
| prompts | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
poc-memory
A persistent memory and notification system for AI assistants, modelled after the human hippocampus. Combines episodic memory (timestamped journal of experiences) with an associative knowledge graph (weighted nodes connected by typed relations), and layered background processes that maintain graph health — mirroring how biological memory consolidates during rest.
Components
| Component | What it does | Docs |
|---|---|---|
| Memory store | Knowledge graph with episodic journal, TF-IDF search, spectral embedding, weight decay | docs/memory.md |
| Memory daemon | Background pipeline: experience-mine, fact-mine, consolidation | docs/daemon.md |
| Notification daemon | Activity-aware message routing from IRC and Telegram | docs/notifications.md |
| Hooks | Claude Code integration: memory recall and notification delivery | docs/hooks.md |
Getting started
Install
cargo install --path .
This builds four binaries:
poc-memory— memory store CLI (search, journal, consolidation)memory-search— Claude Code hook for memory recallpoc-daemon— notification daemon (IRC, Telegram, idle tracking)poc-hook— Claude Code hook for session lifecycle events
Initialize
poc-memory init
Creates the store at ~/.claude/memory/nodes.capnp and a default
config at ~/.config/poc-memory/config.jsonl. Edit the config to
set your name, configure context groups, and point at your projects
directory.
Set up hooks
Add to ~/.claude/settings.json (see docs/hooks.md
for full details):
{
"hooks": {
"UserPromptSubmit": [{"hooks": [
{"type": "command", "command": "memory-search", "timeout": 10},
{"type": "command", "command": "poc-hook", "timeout": 5}
]}],
"Stop": [{"hooks": [
{"type": "command", "command": "poc-hook", "timeout": 5}
]}]
}
}
This gives your AI assistant persistent memory across sessions — relevant memories are recalled on each prompt, and experiences are extracted from transcripts after sessions end.
Start the background daemon
poc-memory daemon
The daemon watches for completed session transcripts and automatically extracts experiences and facts into the knowledge graph. See docs/daemon.md for pipeline details and diagnostics.
Basic usage
poc-memory journal-write "learned that X does Y" # Write to journal
poc-memory search "some topic" # Search the graph
poc-memory status # Store overview
For AI assistants
- Search before creating:
poc-memory searchbefore writing new nodes - Close the feedback loop:
poc-memory used KEY/poc-memory wrong KEY - Journal is the river, topic nodes are the delta: write experiences to the journal, pull themes into topic nodes during consolidation
- Notifications flow automatically: IRC/Telegram messages arrive as additionalContext
- Use daemon commands directly:
poc-daemon irc send #channel msg,poc-daemon telegram send msg