Optional options: { Optional type?: MemoryTypeOptional scope?: MemoryScopeOptional scopeOptional sourceOptional contentOptional tags?: string[]Optional entities?: string[]Optional turnMemoryTrace.turnUserId: set on a trace a turn with no learner files for a second user.
Optional perspectiveWhen encoding a subjective trace from PerspectiveObserver
(@framers/agentos/memory/pipeline/observation/PerspectiveObserver),
thread the source-event identifiers through so the resulting
MemoryTrace carries the MechanismMetadata fields that
applyReconsolidation reads at retrieval time.
Retrieve relevant memories for a query. Called before prompt construction.
Optional options: CognitiveRetrievalOptionsAssemble memory context for prompt injection within a token budget.
Optional options: CognitiveRetrievalOptionsOptional observeFeed a message to the observer (Batch 2). Returns notes if threshold reached.
Optional mood: PADStateOptional options: { Optional contentOptional checkCheck prospective memory triggers (Batch 2).
Optional now?: numberOptional events?: string[]Optional queryOptional queryOptional maxPolicy-tier ceiling: drop prospective items whose tierRank exceeds it,
matching the assembly path. Forwarded to prospective.check.
Optional registerRegister a new prospective reminder/intention.
Optional listList active prospective reminders.
Optional removeOptional runRun consolidation cycle (Batch 2).
Get memory health diagnostics.
Access the underlying long-term memory store for diagnostics/devtools.
Total number of memory traces currently resident in the manager's in-memory trace cache. Ergonomic passthrough to MemoryStore.getTraceCount; used by agentos-bench for memory-footprint telemetry.
Access the working-memory model for diagnostics/devtools.
Get the resolved cognitive-memory runtime config.
Get graph module when enabled.
Get observer module when enabled.
Get the memory reflector if configured, or null.
Step-8: Force the memory reflector to run over any pending observation notes regardless of accumulated-token threshold. Encoded reflection traces land in the memory store; superseded trace IDs are soft-deleted. Returns the IDs so callers can apply side effects (e.g. BM25 indexing).
Optional mood: PADStateOptional mood override passed to each encoded trace.
Optional scopeOverride: { When set, overrides the scope + scopeId on
every reflection-derived trace before encoding. Needed when the
caller (e.g. bench adapter) needs all reflection traces to land in
the same scope the retrieval path queries, regardless of what the
reflector LLM invented.
Get prospective-memory manager when enabled.
Optional setAttach a HyDE retriever for hypothesis-driven memory recall.
Pass null to disable.
Optional getGet the HyDE retriever if configured, or null.
Optional getGet infinite-context runtime stats when enabled.
Optional rehydrateReturn the verbatim content that was archived when this trace was
consolidated, or null if the trace is not gisted/archived or the
archive is unreachable.
The trace id to rehydrate.
Optional requestContext: stringOptional caller hint for audit.
The original verbatim content, or null.
Optional deleteDelete every trace of one scope for good, as an account deletion needs: its memory-graph node, its original in
the configured archive and the typed facts extracted from it, then the trace in the cache (every store over the
Brain in this process keeps none of its words), the vector index and the Brain, and the knowledge graph's
episodic copy (MemoryStore.deleteScope). With no Brain, the scope's documents in the vector index are found and
deleted too, those another store filed before a restart included. With turnUserId, only the scope's traces that
user filed as a second user on the session (MemoryTrace.turnUserId). Optional, so a host's own
implementation keeps compiling.
Optional options: { Optional turnTypeError when scopeId is empty, so a caller's missing id never deletes every trace filed under no scope
id, or when turnUserId is given and is not a non-empty string.
Optional deleteDelete the given traces for good, as deleteScope does for a scope. An id with no Brain row and no trace in
the store is skipped; with no Brain, a trace the store never loaded is reached through deleteScope alone.
Optional ensureRe-files the Brain's plain user and persona scope ids that hold a /, a % or a : in the encoded form a
learning layer reads, once per Brain, and moves what the manager's store holds of the traces it moved; on a Brain
another handle or process re-filed, the store follows the Brain's rows (MemoryStore.ensureEncodedScopeIds). The
layer calls it when it first opens the manager. Optional, so a host's own implementation keeps compiling.
How many traces its re-file moved: none when the Brain held the record already.
Encode a new input into a memory trace. Called after each user message.