Overview
Mengram gives your AI three distinct memory types, inspired by how human memory works:| Type | Stores | Example |
|---|---|---|
| Semantic | Facts, knowledge, preferences | ”User prefers dark mode and uses Python 3.12” |
| Episodic | Events, experiences, interactions | ”Fixed an OOM bug on Jan 15 by reducing pool size” |
| Procedural | Workflows, processes, skills | ”How to deploy: 1) run tests, 2) build, 3) push to main” |
m.add(messages), all three types are extracted automatically from the conversation.
Semantic Memory
The knowledge graph. Entities with facts, types, and relationships. This is the core memory layer.Episodic Memory
Autobiographical events — what happened, when, with whom, and what the outcome was. Each episode has a summary, context, outcome, and participant list.Procedural Memory
Learned workflows and processes. Mengram extracts step-by-step procedures from conversations and tracks which ones work and which fail.Graph RAG
Memories aren’t flat — they’re connected in a knowledge graph. When you search, Mengram doesn’t just find direct matches. It traverses relationships to surface context that simple vector search misses.graph_depth:
Ebbinghaus Decay
Mengram models memory decay like the human brain. Facts that haven’t been accessed recently fade in importance, while frequently recalled facts get stronger. The formula:effective_importance = base_importance * e^(-0.03 * days_since_access) + frequency_boost
- A fact accessed yesterday has full weight
- A fact untouched for 30 days decays to ~40% weight
- A fact accessed 100 times gets a frequency boost regardless of recency
Confidence Scoring
Procedural memory uses confidence scoring to decide when to create new procedures:| Confidence | Action |
|---|---|
| < 0.4 | Skip — not enough evidence |
| 0.4 – 0.6 | Create a suggestion trigger — user decides |
| >= 0.6 | Auto-create the procedure |