Skip to main content

Interface: MemoryConfig

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:202

Top-level configuration object for the Memory facade.

All fields are optional; sensible defaults are applied per field. A minimal {} config is valid and will use a temporary SQLite brain file with graph + self-improvement enabled.

Properties​

connectionString?​

optional connectionString: string

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:229

Postgres connection string. Required when store='postgres'.

Example​

'postgresql://postgres:wunderland@localhost:5432/agent_memory'

consolidation?​

optional consolidation: ExtendedConsolidationConfig

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:282

Consolidation schedule and thresholds.


decay?​

optional decay: boolean

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:279

Whether memory traces lose strength over time following an Ebbinghaus forgetting-curve model.

Default​

true

embed()?​

optional embed: (text) => Promise<number[]>

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:258

Optional embedding function for generating vectors at remember/recall time. When provided, enables HNSW vector search in recall() and stores embeddings alongside text in remember(). Without this, recall() falls back to FTS5-only.

Parameters​

text​

string

Returns​

Promise<number[]>

Example​

const mem = await Memory.createSqlite({
embed: async (text) => {
const res = await openai.embeddings.create({ model: 'text-embedding-3-small', input: text });
return res.data[0].embedding;
},
});

embeddings?​

optional embeddings: EmbeddingConfig

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:241

Embedding model configuration (provider name + optional model).


forgotten?​

optional forgotten: ForgottenLedger | Omit<ForgottenLedgerOptions, "primary">

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:307

The forgotten-user ledger this store's deletions and guards use: one already open, or the options to open one over this store's own adapter. Memory.markForgotten and Memory.isForgotten write and read it. A store opened without one has neither call.

With options, the ledger's table lives in the store's own database, and copy names the adapter of the second copy kept outside it (openForgottenCopy opens one). The open is refused, and the store closed again, when the ledger does not open: its copy is missing, or its tombstones are keyed and the key is not given. The open also compares the ledger identity the store holds with its copy's, and refuses a copy that belongs to another store.

Tombstones are database-wide, including historical learner rows: brain ids do not isolate them. Give each agent its own database or PostgreSQL schema and a separate copy outside restores.

Example​

const { adapter: copy } = await openForgottenCopy('./data/forgotten.sqlite');
const mem = await Memory.createSqlite('./data/agent-memory.sqlite', { forgotten: { copy } });
await mem.markForgotten({ kind: 'user', id: userId });

graph?​

optional graph: boolean

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:265

Whether to build and maintain a knowledge graph alongside the vector store. When enabled, entity co-occurrence and semantic edges are tracked.

Default​

false

ingestion?​

optional ingestion: IngestionConfig

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:285

Document ingestion settings applied to all ingest() calls by default.


path?​

optional path: string

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:223

File-system path for stores that require one (e.g. SQLite db file). Ignored by in-memory and remote stores.

Example​

'./data/agent-memory.sqlite'

qdrantApiKey?​

optional qdrantApiKey: string

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:238

Qdrant API key for cloud instances. Optional.


qdrantUrl?​

optional qdrantUrl: string

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:235

Qdrant base URL. Required when store='qdrant'.

Example​

'http://localhost:6333'

selfImprove?​

optional selfImprove: boolean

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:272

Whether the agent may autonomously refine and restructure its own memories (write new insight traces, prune contradictions, merge redundancies).

Default​

false

store?​

optional store: "memory" | "postgres" | "qdrant" | "sqlite" | "neo4j" | "hnsw"

Defined in: packages/agentos/src/cognition/memory/io/facade/types.ts:216

Persistence backend for memory traces.

The Phase 1 facade currently implements the SQLite path at runtime. Other values are reserved for future backends and will throw if selected.

  • 'sqlite' – file-based SQLite (implemented; recommended).
  • 'memory' – reserved for a future in-process backend.
  • 'qdrant' – reserved for a future vector-database backend.
  • 'neo4j' – reserved for a future graph-database backend.
  • 'hnsw' – reserved for a future ANN-only backend.

Default​

'sqlite'