Skip to content

ExtractedValue

A schema-validated value produced by an extractor.

Deliberately NOT a PersistentMemoryBlock. A block is markdown the model maintains under a character limit; this is typed JSON the runtime owns and validates against a Zod schema. Sharing the block type would mean inventing a charLimit on every write and calling JSON “raw markdown content” — the type would not fit, which is the signal that it is the wrong type.

They also differ on every axis that matters: writer (runtime vs model), shape (typed JSON vs markdown), validity (schema vs char limit + safety scan), consumer (prior-value prompt and onExtracted vs the system prompt), and mutability (integrity-critical vs model-editable by design).

Type Parameter Default type

T

unknown

scope: MemoryBlockScope;

Ownership dimension only — the same meaning it has on a block.


slug: string;

Stable kebab-case slug derived from the extractor’s name.


updatedAt: string;

ISO8601.


value: T;

The validated value. Serialization is the store’s business, not the caller’s.