prism-mem
Every coding session leaves behind artifacts. Prism reads them and turns them into structured, reusable knowledge. Automatically.
See it in action
The problem with manual context files
You write CLAUDE.md. Tech stack, decisions, conventions. It is accurate.
You migrated from SQLite to PostgreSQL. You forgot to update CLAUDE.md.
The agent confidently uses SQLite APIs. Because that is what the context file says.
Real numbers from a 3-session demo
411,463 bytes of raw Claude Code transcripts condensed to 11,707 characters of structured, queryable knowledge
How it works
Ingest
Reads Claude Code session transcripts from ~/.claude/projects/ and the git diff after every commit.
Extract
kg-gen passes the combined text through an LLM and returns (subject, predicate, object) triples.
Store + Link
Triples are embedded locally with sentence-transformers, stored in SQLite, and linked by cosine similarity. Facts that contradict newer ones are marked stale automatically.
Generate
The top 30 triples by recency and confidence score go to your configured LLM. CLAUDE.md, .cursorrules, and AGENTS.md are rewritten in place.
Automatic staleness detection
No config. No prompt. No manual update. Prism detected the migration automatically.
Get started in 3 commands
1. Install
pip install prism-mem
2. Configure your LLM provider
prism config set provider anthropic prism config set model claude-haiku-4-5-20251001 prism config set api-key <your-api-key>
3. Install the post-commit hook. Runs in the background after every commit.
prism hook install --project .
Works with Claude Code, Cursor, and Codex
claude mcp add prism -- \ prism serve --project /path/to/project
{
"mcpServers": {
"prism": {
"command": "prism",
"args": [
"serve",
"--project",
"/path/to/project"
]
}
}
}{
"mcpServers": {
"prism": {
"command": "prism",
"args": [
"serve",
"--project",
"/path/to/project"
]
}
}
}