Memory Curator
The memory curator is an autonomous background process that runs every four hours and actively improves the quality of the knowledge graph. It scans recent interactions, extracts new facts, resolves contradictions between stored memories, merges duplicate entities, and promotes high-confidence insights up through the memory tiers.
What it does
- Scans recent content — Loads the last 24 hours of session messages and daily memory entries for each user
- Extracts facts and entities — Uses an LLM to identify new entities, relationships, and insights not yet in the graph
- Resolves contradictions — Detects conflicting memory entries (e.g. two conflicting facts about the same entity) and flags or reconciles them
- Merges duplicates — Finds graph nodes that refer to the same real-world entity under different names and merges them
- Promotes insights — High-confidence facts are promoted up the tier hierarchy: Ephemeral → Daily → Profile
Schedule
The curator runs every 4 hours for all active users. Results are logged with counts of entities created, edges added, contradictions found, and tier promotions made. The curator does not run for users with no recent activity.
Curation result
| Field | Description |
|---|---|
entitiesCreated | New graph nodes added this run |
edgesCreated | New relationships added between existing nodes |
contradictionsFound | Memory conflicts flagged for review |
promotions | Insights promoted to a higher memory tier |
durationMs | Wall-clock time for the curation run |
Relationship to auto-extraction
Both the curator and auto-extraction build the knowledge graph, but they operate differently:
| Auto-extraction | Memory curator | |
|---|---|---|
| Trigger | After every agent turn | Every 4 hours on a schedule |
| Scope | Single conversation turn | All recent activity for the user |
| Focus | Extract entities from new content | Improve quality, resolve conflicts, promote insights |
| Contradiction handling | None | Yes — detects and flags conflicts |
ℹThe curator uses a synthetic user ID (
curator:<uid>) when calling the agent loop. Curator runs do not appear in user session history.