Expand description
The provider-agnostic post-turn memory extractor (docs/reference/personas.md §5, issue #214).
After a turn commits, a cheap model distills the transcript into durable facts about the person — never in the turn’s hot path. The extractor is handed the persona’s existing ACTIVE facts so contradictions come back as invalidations (paired with the replacing fact) rather than duplicates; the store then closes the old fact’s validity interval — invalidate, never delete.
Like the participation classifier next door, this is deliberately provider-agnostic and tolerant on the way out: a reply that isn’t the expected JSON extracts nothing (memory is best-effort enrichment; a flaky cheap model must never break the pipeline).
Structs§
- Candidate
Fact - One fact the extractor proposes to remember.
- Existing
Fact - An existing active fact, as shown to the extractor for contradiction checks.
- Extracted
Memories - What one extraction pass proposes.
- Invalidation
- One existing fact the extractor proposes to invalidate (contradicted by this turn).
Constants§
- MAX_
FACTS_ PER_ TURN - Most facts one turn may add. A chatty turn distills to a few durable facts; dozens means the model is transcribing, not distilling.
- MIN_
CONFIDENCE_ BPS - Write-time confidence floor (
#796).
Functions§
- extract_
memories - Distill one committed turn into memory operations.
- looks_
like_ authorization_ claim - The post-parse authorization-claim heuristic (
#1925). - looks_
like_ pii - The post-parse PII heuristic (
#796): a refused-category keyword or a long digit run anywhere in the text.