AddMessagesContext
Defined in: src/memory/types.ts:42
Context the MemoryManager supplies to MemoryStore.addMessages alongside a batch.
An extension point: fields are added here without changing the MemoryStore.addMessages signature.
Properties
Section titled “Properties”sequenceNumbers?
Section titled “sequenceNumbers?”readonly optional sequenceNumbers?: readonly number[];Defined in: src/memory/types.ts:50
Per-message identities aligned one-to-one with messages (sequenceNumbers[i] identifies
messages[i]). A retried batch reuses the same numbers, so a store can build an idempotency key
that survives retries - unlike a content hash, which collides when two messages share text (e.g.
“ok”). Numbers increase with order but may have gaps, and reset to 0 each agent run, so a durable
dedup token must combine one with a run-unique id.