Access the underlying manager for advanced usage.
Access the underlying standalone Memory facade for advanced usage.
Optional backend: ICognitiveMemoryManager | StandaloneMemoryBackendStatic wrapCreate an AgentMemory wrapping an existing CognitiveMemoryManager. Use this in wunderland where the manager is already constructed.
Static wrapCreate an AgentMemory wrapping the standalone SQLite-first Memory facade.
Static sqliteCreate an initialized SQLite-backed AgentMemory for standalone usage.
Optional config: MemoryConfigInitialize the cognitive-manager path. Only needed when constructing the
legacy cognitive backend directly (not via AgentMemory.wrap() or
AgentMemory.sqlite()).
Store information in long-term memory.
Optional options: { Optional type?: MemoryTypeOptional scope?: MemoryScopeOptional scopeOptional sourceOptional tags?: string[]Optional entities?: string[]Optional importance?: numberOptional currentLive PAD mood for mood-congruent encoding. Omitted → neutral (no bias).
Optional contentContent sentiment for the emotional-context tag. Omitted → falls back to importance (today's behavior).
Optional perspectiveSet when encoding a subjective trace produced by PerspectiveObserver
(@framers/agentos/memory/pipeline/observation/PerspectiveObserver).
When this memory wraps a cognitive memory manager, the manager writes
the source event's identifier and hash into the trace's
MechanismMetadata and marks the trace perspective-encoded, so
Reconsolidation halves its drift rate. A memory that wraps the
standalone Memory facade ignores it.
await memory.remember("User prefers dark mode");
await memory.remember("Deploy by Friday", { type: 'prospective', tags: ['deadline'] });
Recall memories relevant to a query.
Optional options: SearchOptionsconst results = await memory.recall("what does the user prefer?");
for (const m of results.memories) {
console.log(m.content, m.retrievalScore);
}
Search memories (alias for recall with simpler return).
Optional options: SearchOptionsFeed a conversation turn to the observational memory system. The Observer creates dense notes when the token threshold is reached.
await memory.observe('user', "Can you help me debug this?");
await memory.observe('assistant', "Sure! The issue is in your useEffect...");
Get assembled memory context for prompt injection within a token budget.
Register a prospective memory (reminder/intention).
List active reminders.
Memory health diagnostics.
Ingest files, directories, or URLs. Available only when backed by the standalone SQLite-first Memory facade.
Optional options: IngestOptionsImport previously exported memory data. Available only when backed by the standalone SQLite-first Memory facade.
Optional options: ImportOptionsExport memory data. Available only when backed by the standalone SQLite-first Memory facade.
Optional options: ExportOptionsThe traces the export left out, with the reason for each (see Memory.export).
Get a serializable snapshot of the memory graph for visualization. Returns nodes (traces), edges (associations), clusters, and aggregate stats.
Graph snapshot suitable for JSON serialization
When backed by standalone SQLite (requires CognitiveMemoryManager)
Get spreading activation results from seed memories. Returns memories that are associatively connected to the seeds.
IDs of seed traces to activate from
Optional opts: { Optional depth and limit controls
Optional maxOptional limit?: numberWhen backed by standalone SQLite
Get all traces filtered by memory type.
Memory type to filter by (episodic, semantic, procedural, prospective, relational)
Optional opts: { Optional limit and minimum strength filter
Optional limit?: numberOptional minWhen backed by standalone SQLite
Get relational memory traces (trust signals, boundaries, emotional bonds). Convenience wrapper around getTracesByType('relational').
Optional opts: { Optional limit?: numberGet memory strength distribution by type. Returns count, average strength, decaying count, and flashbulb count per type.
When backed by standalone SQLite
Get clusters of strongly associated memories.
Optional minSize: numberMinimum cluster size (default 3)
When backed by standalone SQLite
Get working memory slots — what's currently "in focus".
When backed by standalone SQLite
Get active prospective memory items (reminders/intentions).
Alias for reminders() with a more descriptive name.
Force a reflection cycle (useful for testing / devtools). Triggers the Observer's note extraction and the Reflector's consolidation regardless of token thresholds.
Reflection result with typed traces, or empty result if no observer
When backed by standalone SQLite
Import a memory snapshot (for character portability across worlds). Encodes each trace and registers prospective items.
Previously exported snapshot
Count of imported traces and conflicts detected
When backed by standalone SQLite
High-level memory facade for AI agents.
Wraps either
ICognitiveMemoryManageror the standaloneMemoryfacade with a simple API that hides PAD mood models, HEXACO traits, SQLite storage details, and internal architecture.