Agents

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

  1. Scans recent content — Loads the last 24 hours of session messages and daily memory entries for each user
  2. Extracts facts and entities — Uses an LLM to identify new entities, relationships, and insights not yet in the graph
  3. Resolves contradictions — Detects conflicting memory entries (e.g. two conflicting facts about the same entity) and flags or reconciles them
  4. Merges duplicates — Finds graph nodes that refer to the same real-world entity under different names and merges them
  5. 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

FieldDescription
entitiesCreatedNew graph nodes added this run
edgesCreatedNew relationships added between existing nodes
contradictionsFoundMemory conflicts flagged for review
promotionsInsights promoted to a higher memory tier
durationMsWall-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-extractionMemory curator
TriggerAfter every agent turnEvery 4 hours on a schedule
ScopeSingle conversation turnAll recent activity for the user
FocusExtract entities from new contentImprove quality, resolve conflicts, promote insights
Contradiction handlingNoneYes — 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.