Skip to main content
Agents can persist every data point they generate and use in a database, set by the db param. We can store sessions, memory, knowledge, traces, schedules, approvals, learnings and even usage metrics. The primitives (agents, teams, workflows) and the AgentOS accept a db param. Pick from JSON files (local or cloud), embedded (SQLite), relational (Postgres, MySQL), document (MongoDB), key-value (Redis, DynamoDB, Firestore), or distributed (SingleStore).
When we set the db param, AgentOS creates the tables and indexes on first boot.

What gets stored

  • Backend-specific names may vary.
  • Schema changes are generally additive.

Pick a backend

PostgresDb is the default for most tutorials and the recommended production database. It pairs well with PgVector to keep relational data and embeddings on the same engine. Postgres-compatible managed services like Neon and Supabase work with PostgresDb directly. Point db_url at the managed instance. Async variants (AsyncPostgresDb, AsyncSqliteDb, AsyncMongoDb, AsyncMySQLDb) are documented under Database.

Vector storage

Knowledge needs a vector store and agno supports every vector database out of the box.
Other options: LanceDB, Qdrant, Weaviate, Pinecone, Chroma, MongoDB Atlas, Cosmos, Cassandra, ClickHouse, SurrealDB, Milvus. See Vector Stores. For most production AgentOS deployments, PgVector + PostgresDb on the same Postgres is the right default. One database, hybrid search, transactional reads, no extra service to operate.

Splitting concerns across databases

Every agent, team, and workflow can take its own db, overriding the AgentOS default. Use the AgentOS db for shared state and hand individual components a separate database when they need isolation:
Common splits: per-tenant DBs for strict isolation, a high-traffic agent on its own engine, or routing one workflow’s session history to a cheaper backend.

File and blob storage

For media that doesn’t belong in the relational store (generated images, audio, large PDFs), store them in object storage and reference paths in agno_knowledge or agno_sessions.