Skip to content

InvocationTrigger

Defined in: src/memory/extraction/triggers.ts:17

Runs extraction after every agent invocation.

The highest-fidelity option: nothing said in a turn is missed. Also the most expensive when an Extractor is configured (a model call per turn) — for a server-side-extraction backend with no extractor it is just a per-turn write.

extraction: { trigger: [new InvocationTrigger()] }
new InvocationTrigger(): InvocationTrigger;

InvocationTrigger

ExtractionTrigger.constructor

readonly name: "invocation" = 'invocation';

Defined in: src/memory/extraction/triggers.ts:18

Stable identifier for this trigger kind, used in logging.

ExtractionTrigger.name

attach(context): void;

Defined in: src/memory/extraction/triggers.ts:20

Wire this trigger into the agent lifecycle.

Called once per store during MemoryManager initialization. Register hooks on context.agent and call context.fire() when extraction should run.

ParameterTypeDescription
contextExtractionTriggerContextThe agent to attach to and the fire callback bound to this trigger’s store

void

ExtractionTrigger.attach