Why OpenLTM
You explained your auth layer once. Why does your agent ask again tomorrow?
AI coding agents forget everything when a session ends or the context window compacts. OpenLTM gives them a long-term memory: hooks capture what was learned, and the next session starts with the relevant memories already in context. No cloud account, no telemetry, no Docker stack.
- Automatic. Session hooks save and inject memories; you don't have to remember to remember.
- Search by meaning. Hybrid recall: SQLite FTS5 full-text search plus vector embeddings, fused with Reciprocal Rank Fusion.
- Local and private. One SQLite database you own. Embeddings run on a local llama.cpp server by default.
- One memory, every agent. Claude Code, OpenCode, Pi, OpenClaw and Hermes share the same database, so a gotcha learned in one is there in the others.
- Memories age. Decay, supersede and a janitor keep the store small and current instead of hoarding transcripts.
Quick start
Claude Code (2.1.275 or later):
claude plugin install openltm --marketplace RohiRIK/OpenLtm
Restart Claude Code. The hooks wire themselves and the database is created on first run. Then, in a session:
/openltm:memory recall auth what do we know about auth here?
/openltm:memory learn <insight> save something worth keeping
/openltm:health memory health and decay summary
Turn on search by meaning (optional; without it recall uses full-text search only):
llama-server -m bge-m3.gguf --embeddings --pooling mean --port 8080
Run /openltm:doctor to confirm semantic recall is on. Five-minute guide: Local embeddings.
Other agents, bunx and git-clone installs: Installation.
Supported agents
| Agent | Install |
|---|
| Claude Code | claude plugin install openltm --marketplace RohiRIK/OpenLtm |
| OpenCode | bunx @rohirik/openltm-core --opencode |
| Pi | bunx @rohirik/openltm-core --pi |
| OpenClaw | openclaw plugins install clawhub:@rohirik/openclaw-ltm --accept-capabilities |
| Hermes | hermes plugins install openltm (guide) |
| Any MCP host | bunx @rohirik/openltm-core mcp-serve |
| Shell, cron, CI | bunx @rohirik/openltm-core memory recall --query "docker rate limit" --json |
Where each package is published (npm, ClawHub, Pi catalog, Hermes catalog): Distribution.
Features