Skip to main content
Memory answers several different needs. Start with the state you need to retain, then enable only the stores that serve that task. An Agent without explicit memory still keeps fallback conversation history in process; reusing an owned session can recall earlier turns. Persistence across restarts requires a storage-backed configuration.

The mental model

Quick Start

Inspect storage and ownership without involving a model. This example runs with @agentium/core@4.0.0 in an ESM TypeScript project:
The example records a manual fact and clears process-local storage on exit. To run a real conversation with persistent history, continue to Agent memory or the memory tutorial.

Full Configuration

UnifiedMemoryConfig requires storage. The optional fields choose behavior; they are not a reason to enable every store at once. See store configuration for typed composition. Vector and graph drivers have separate dependencies, credentials, and lifecycle responsibilities.

How It Works

Before a run, the memory manager builds context from enabled stores. Session history is a separate part of the model request. After a run, enabled extraction work can save new records. Extraction can incur model/embedding calls and finish asynchronously; drain owned work before closing resources. A saved record is not proof that a future model will follow it. Use deterministic application validation for rules that must hold. Inspect actual context and evaluate answers after memory changes.

Simplified API

remember, recall, and forget are convenience methods with specific store coverage. They are not universal CRUD across every store. Read their supported behavior, especially before exposing recall or deletion through an API.

Accessing Stores Directly

Getter methods return null when their feature is disabled. Check the result instead of hiding it with a non-null assertion. Direct access bypasses your HTTP authentication layer; the host must validate identities and resource ownership.

Multi-User Isolation

Use scoped storage and verified identity. Session IDs alone do not establish ownership. Learnings, procedures, corrections, entities, and graph records have different scope contracts; memory isolation describes where application control is required.

Observability

Observe extraction errors and inspect records from the same verified scope used by the run. Reconcile vector-backed stores after partial writes when needed. Keep maintenance, token budgets, and evaluation in the application development loop.