Interface EnrichMemoryOptions
interface EnrichMemoryOptions {
timeout?: number;
memoryIdx: string;
sessionId: string;
title: string;
content: string;
tags?: Iterable<Tag, any, any>;
sources?: Iterable<string, any, any>;
source?: DataSource;
}
timeout?: number;
memoryIdx: string;
sessionId: string;
title: string;
content: string;
tags?: Iterable<Tag, any, any>;
sources?: Iterable<string, any, any>;
source?: DataSource;
}
Hierarchy (View Summary)
- TimeoutOptions
- EnrichMemoryOptions
Properties
Optionaltimeout
timeout?: number
Seconds to wait for this call. Defaults to the client's own timeout.
memoryIdx
memoryIdx: string
The memory to extend, or 'new' to open a standalone one.
sessionId
sessionId: string
The session the memory was returned in.
title
title: string
A short title describing what was learned.
content
content: string
The knowledge to add.
Optionaltags
Tags narrowing what it applies to.
Optionalsources
sources?: Iterable<string, any, any>
Memories that helped reach this insight. Trimmed to the service's cap.
Optionalsource
Whether a human or the agent produced it. Defaults to DataSource.AGENT.
What MemoryOperations.enrichMemory writes an addition from.
There is no domain to name here, and that is the difference from CreateMemoryOptions. An addition lands in the domain its session ran in, which is why EnrichMemoryOptions.sessionId is required rather than one half of a pair — and why the tag cap is left to the service, since the client cannot see which domain that is.
EnrichMemoryOptions.memoryIdx is the memory to extend, copied from a search result, or the NEW_MEMORY sentinel to open a standalone memory instead. The sentinel is case-sensitive:
'New'is read as an ordinary handle. It also changes what a later revert can remove: a revert reports RevertOutcome.MEMORY_REMOVED when the insight it undid was its memory's last, which is reachable for a memory the sentinel opened and not for one that already held others. Read the outcome rather than assuming either.EnrichMemoryOptions.title and EnrichMemoryOptions.content are bounded together exactly as they are on a create. EnrichMemoryOptions.sources are trimmed to the service's cap rather than refused, so citing more than it keeps loses the tail — nothing in the result says so, and a debug log record is the only sign of it.
Example