IntervalTrigger
Defined in: src/memory/extraction/triggers.ts:45
Runs extraction every N agent invocations.
A controllable middle ground: extraction (and any model call it entails) happens on a cadence rather than every turn, while the high-water mark guarantees the messages from the skipped turns are still processed when the trigger does fire.
Example
Section titled “Example”extraction: { trigger: [new IntervalTrigger({ turns: 5 })] }Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new IntervalTrigger(options): IntervalTrigger;Defined in: src/memory/extraction/triggers.ts:49
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options | IntervalTriggerOptions |
Returns
Section titled “Returns”IntervalTrigger
Overrides
Section titled “Overrides”Properties
Section titled “Properties”readonly name: "interval" = 'interval';Defined in: src/memory/extraction/triggers.ts:46
Stable identifier for this trigger kind, used in logging.
Overrides
Section titled “Overrides”Methods
Section titled “Methods”attach()
Section titled “attach()”attach(context): void;Defined in: src/memory/extraction/triggers.ts:57
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.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
context | ExtractionTriggerContext | The agent to attach to and the fire callback bound to this trigger’s store |
Returns
Section titled “Returns”void