Skip to main content
Agents persist the data they generate and use in a database, set by the db param: sessions, memory, knowledge metadata, traces, schedules, approvals, learnings, and 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, Firestore), key-value (Redis, Valkey, DynamoDB), or distributed (SingleStore).
AgentOS creates the tables and indexes on first boot. Set auto_provision_dbs=False on AgentOS when you manage the schema yourself.

What gets stored

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

Pick a backend

Most tutorials use PostgresDb. Pair it with PgVector when you want relational data and embeddings on the same Postgres instance. 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 15+ vector databases 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 with hybrid search and transactional reads, and 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 include separate tenant databases, a high-traffic agent on its own engine, or one workflow’s session history on a different backend. Database-level tenant isolation also requires separate credentials and grants.

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.