DB • TypeScript AI Agent SDK

* Database Module – Exports for persistence layer

db

TypeScript AI Agent

  • Database Module – Exports for persistence layer
  • Usage (Python-like simplicity):
  • const agent = new Agent({

instructions: “You are helpful”, db: db(“sqlite:./data.db”), // URL-style string, persists to a file sessionId: “my-session” });

  • What is durable today:
  • db(“sqlite:./data.db”) persists to disk and survives the process
  • db(“sqlite::memory:”) real SQLite, but process-local
  • db(“memory:”) in-process Maps, lost when the process exits
  • postgres:// and redis:// still throw — see createDbAdapter below.

Import

typescript
import { db } from 'praisonai';

Functions


Related Documentation