step 2 · pull out the claims (L1)
One pass reads the conversation; another decides whether each claim is new.
The first model call splits Alice’s messages into standalone facts and instructions, assigns a kind and priority, and cites the source messages. Search then finds similar active memory. A final pass chooses store, merge, or skip; skipped duplicates are not written.
message 1 Alice“New Node services use Fastify. Billing stays on Express until mobile drops the old response fields.”
message 2 Alice“Never deploy billing changes without my explicit approval.”
message 3 Alice“Before removing compatibility, show me telemetry proving the old fields have zero traffic.”
l1_extract
extract → search → decide
memory · persona priority 80New Node services use Fastify.
memory · episodic priority 85Billing stays on Express while mobile depends on the old response fields.
memory · instruction priority 100Billing changes require Alice’s explicit approval before production deployment.
memory · instruction priority 95Remove compatibility only after telemetry shows zero traffic.
Visible effect: 3 immutable inputs → 4 independently retrievable claims. Each output cites the message that supports it.
derivations/l1_extract.yamlL0 → L1trigger:
write: {collections: [messages]}
sources:
new_messages: {kind: changes}
background: {kind: view,
view: recent_messages@1}
tasks:
- {id: claims, use: llm}
- {id: existing, use: search}
- {id: result, use: llm}
emit:
collection: memories
type: memory
claimsExtract one reusable statement per record. “Never deploy…” becomes an instruction with priority 100, not a vague conversation summary.
existingRetrieve what memory already says before deciding. This is what makes repeat → skip and changed fact → merge possible.
resultCopy or reconcile claims after retrieval. Separating the calls prevents deduplication from collapsing a rich conversation into one sentence.
writes nextFour memories events, one sentence each: “New Node services use Fastify” (persona, p80) · “Billing stays on Express while mobile depends on the old response fields” (episodic, p85) · “Billing changes require Alice’s explicit approval before production deployment” (instruction, p100) · “Remove compatibility only after telemetry shows zero traffic” (instruction, p95). Each cites the message it came from. A repeated rule would write nothing.