What is a Dataset Database Handler?
Dataset Database Handlers are small, pluggable classes that define how a Cognee dataset maps to concrete storage backends for:- Graph databases
- Vector databases

If you’re using Cognee with
ENABLE_BACKEND_ACCESS_CONTROL set to False, you don’t need to configure handlers. How graph isolation works
Dataset Database Handlers matter specifically in multi-user mode, because that is when Cognee stops treating datasets as logical partitions inside one shared graph and starts routing each dataset to its own storage backend.| Single-user mode | Multi-user mode | |
|---|---|---|
| Graph databases | One shared instance | One per dataset |
| Separation mechanism | dataset_id metadata filter | Physical database boundary |
| Handler required | No | Yes (GRAPH_DATASET_DATABASE_HANDLER) |
- Single-User Mode
- Multi-User Mode
All datasets share one physical graph database. There are no hard graph-level boundaries between them. Dataset separation is tracked logically in the relational database through
dataset_id, and queries are scoped using that metadata at runtime.What Dataset Database Handlers Do
Handlers encapsulate all backend-specific logic required to manage dataset storage, including:- Provisioning or resolution of per-dataset storage
- Runtime connection resolution, such as:
- Secret decryption
- Fetching short-lived credentials
- Teardown and deletion of per-dataset storage
Why Dataset Database Handlers Exist
Dataset Database Handlers solve several core system needs:- Multi-tenant isolation — Each dataset can map to its own graph and/or vector database, enabling clean separation when backend access control is enabled.
- Pluggability — Providers like LanceDB, Kùzu, or Neo4j Aura can be added or swapped without changing application logic.
- Secure secret handling — Credentials can be resolved at connection time instead of being stored in plaintext in the relational database.
- Lifecycle control — All create, resolve, and delete semantics for a backend live in one well-defined place.
Datasets
Learn about datasets as the core unit of storage in Cognee
Dataset Database Handlers: How to use them
Deep dive into configuring and using dataset database handlers