Extractor
A named, typed, structured thing to learn from a conversation.
Always schema-driven — no Mastra-style tag-scraping inline mode.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
|
|
|
Properties
Section titled “Properties”includePrevious
Section titled “includePrevious”readonly includePrevious: boolean;Include the previously extracted value in the prompt. Default true.
instructions
Section titled “instructions”readonly instructions: string | ((c) => string | Promise<string>);readonly name: string;onExtracted?
Section titled “onExtracted?”readonly optional onExtracted?: (c) => void | T | Promise<void | T>;Interceptor: returning a value replaces it before persistence; throwing records a per-slug failure.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”void | T | Promise<void | T>
persist
Section titled “persist”readonly persist: boolean;Persist to PersistentMemoryStore. false = emit + run onExtracted only. Default true.
schema
Section titled “schema”readonly schema: | ZodType<T, unknown, $ZodTypeInternals<T, unknown>> | ((c) => | ZodType<T, unknown, $ZodTypeInternals<T, unknown>> | Promise<ZodType<T, unknown, $ZodTypeInternals<T, unknown>>>);readonly scope: MemoryBlockScope;readonly slug: string;Derived from name via slugifyExtractorName.