Example — SQLite
File-backed and in-memory SQLite storage examples.
import { Wolbarg, sqlite, openaiEmbedding } from "wolbarg";
const file = new Wolbarg({
organization: "demo",
storage: sqlite("./agent-memory.db"),
embedding: openaiEmbedding({
apiKey: process.env.OPENAI_API_KEY!,
model: "text-embedding-3-small",
}),
});
const mem = new Wolbarg({
organization: "tests",
storage: sqlite(":memory:"),
embedding: openaiEmbedding({
apiKey: process.env.OPENAI_API_KEY!,
model: "text-embedding-3-small",
}),
});