new Agent({ storage }) — there is no top-level storage field.Right:
new Agent({ memory: { storage } })
SQLite
Postgres / Mongo
memory: { storage: pg } (or mongo). Same Agent API.
Drivers: StorageDocumentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Agentium 4.0.0 · Upgrade from 3.x.
Point memory at SQLite, Postgres, or Mongo. There is no storage field on Agent.
new Agent({ storage }) — there is no top-level storage field.new Agent({ memory: { storage } })
import { Agent, SqliteStorage, openai } from "@agentium/core";
const storage = new SqliteStorage("./agent.db");
const agent = new Agent({
name: "assistant",
model: openai(process.env.OPENAI_MODEL ?? "gpt-6.1-sol"),
memory: { storage, summaries: true, userFacts: true },
});
await agent.run("My favorite color is blue.", {
sessionId: "s1",
userId: "u1",
});
const pg = new PostgresStorage(process.env.DATABASE_URL!);
await pg.initialize();
const mongo = new MongoDBStorage(process.env.MONGO_URI!);
await mongo.initialize();
memory: { storage: pg } (or mongo). Same Agent API.
Drivers: Storage