New to configuration?See the Setup Configuration Overview for the complete workflow:install extras → create
.env → choose providers → handle pruning.Supported Providers
Cognee supports multiple graph store options:- Kuzu — Local file-based graph database (default)
- Kuzu-remote — Kuzu with HTTP API access
- Neo4j — Production-ready graph database (self-hosted or Docker)
- Neo4j Aura — Neo4j’s fully managed cloud service
- Neptune — Amazon Neptune cloud graph database
- Neptune Analytics — Amazon Neptune Analytics hybrid solution
- Memgraph — In-memory graph database (community adapter)
Local vs. cloud storage: By default Cognee stores its graph in a local Kuzu file. To persist data in the cloud, switch to a remote provider such as Neo4j Aura, Neptune, or a self-hosted Neo4j instance on a remote server.
Configuration
Environment Variables
Environment Variables
Set these environment variables in your
.env file:GRAPH_DATABASE_PROVIDER— The graph store provider (kuzu, kuzu-remote, neo4j, neptune, neptune_analytics)GRAPH_DATABASE_URL— Database URL or connection stringGRAPH_DATABASE_USERNAME— Database username (optional)GRAPH_DATABASE_PASSWORD— Database password (optional)GRAPH_DATABASE_NAME— Database name (optional)
Setup Guides
Kuzu (Default)
Kuzu (Default)
Kuzu is file-based and requires no network setup. It’s perfect for local development and single-user scenarios.Installation: Kuzu is included by default with Cognee. No additional installation required.Data Location: The graph is stored on disk. Path defaults under the Cognee system directory and is created automatically.
Kuzu (Remote API)
Kuzu (Remote API)
Use Kuzu with an HTTP API when you need remote access or want to run Kuzu as a service.Installation: Requires a running Kuzu service exposing an HTTP API.
Neo4j (Self-Hosted)
Neo4j (Self-Hosted)
Neo4j is recommended for production environments where you need a powerful, dedicated graph database. Data is stored on the Neo4j server (local or remote), not on the Cognee host machine.Installation: Install Neo4j extras:Docker Setup: Start the bundled Neo4j service with APOC + GDS plugins:
Neo4j Aura (Cloud)
Neo4j Aura (Cloud)
Neo4j Aura is Neo4j’s fully managed cloud service. Graph data is stored in Neo4j’s cloud infrastructure — nothing is stored locally on your machine.There are two ways to use Neo4j Aura with Cognee:Option 1 — Connect to an existing Aura instanceCreate a free or paid Aura instance at console.neo4j.io, then point Cognee at it using the Option 2 — Auto-provisioned Aura instances per dataset (multi-user mode)Cognee’s See the Neo4j Aura Dataset Database Handler page for full details on Option 2.Installation: Install Neo4j extras:
neo4j+s:// connection URI provided in your Aura console:Neo4jAuraDevDatasetDatabaseHandler can automatically create and delete a dedicated Neo4j Aura instance for each Cognee dataset. This requires Neo4j Aura API credentials (OAuth):Neptune (Graph-only)
Neptune (Graph-only)
Use Amazon Neptune for cloud-based graph storage.Installation: Install Neptune extras:Note: AWS credentials should be configured via environment variables or AWS SDK.
Neptune Analytics (Hybrid)
Neptune Analytics (Hybrid)
Use Amazon Neptune Analytics as a hybrid vector + graph backend.Installation: Install Neptune extras:Note: This is the same as the vector store configuration. Neptune Analytics serves both purposes.
Advanced Options
Backend Access Control
Backend Access Control
Enable per-user dataset isolation for multi-tenant scenarios.This feature is available for Kuzu and other supported graph stores.
Provider Comparison
Graph Store Comparison
Graph Store Comparison
| Provider | Data Location | Setup | Performance | Use Case |
|---|---|---|---|---|
| Kuzu | Local disk | Zero setup | Good | Local development |
| Kuzu-remote | Remote server | Server required | Good | Remote access |
| Neo4j (self-hosted) | Neo4j server | Server required | Excellent | Production |
| Neo4j Aura | Neo4j cloud | Aura account required | Excellent | Managed cloud |
| Neptune | AWS cloud | AWS required | Excellent | Cloud solution |
| Neptune Analytics | AWS cloud | AWS required | Excellent | Hybrid cloud solution |
Important Considerations
Data Location
Data Location
- Local providers (Kuzu): Graph files are created automatically under
SYSTEM_ROOT_DIRECTORY - Remote providers (Neo4j, Neptune): Require running services or cloud setup
- Path management: Local graphs are managed automatically, no manual path configuration needed
Performance Notes
Performance Notes
- Kuzu: Single-file storage with good local performance
- Neo4j: Excellent for production workloads with proper indexing
- Neptune: Cloud-scale performance with managed infrastructure
- Hybrid solutions: Combine graph and vector capabilities in one system
Community-Maintained Providers
Additional graph stores are available through community-maintained adapters:- Memgraph — In-memory graph database (Bolt protocol)
Notes
Backend Access Control
Backend Access Control
When backend access control is enabled, Cognee can isolate graph data per dataset for supported providers such as Kuzu. This is mainly relevant for multi-user deployments where different users or workloads should not share the same graph state by default.
Path Management
Path Management
For local Kuzu setups, Cognee creates and manages the graph database automatically under the system directory. In most cases you do not need to manually create graph files or point Cognee at a specific path unless you are customizing
SYSTEM_ROOT_DIRECTORY.Cloud Integration
Cloud Integration
Neptune-based setups rely on AWS credentials, network access, and the appropriate IAM permissions to connect successfully. Before using Neptune or Neptune Analytics, make sure your environment can authenticate through the standard AWS SDK credential chain.
Neo4j Type Labels
Neo4j Type Labels
APOC is required for Neo4j type labels. Cognee uses
apoc.create.addLabels to apply type-specific labels to every node. Without it, Cognee can still store nodes, but Neo4j will only show the generic __Node__ label, making entity types harder to inspect directly.The bundled Docker Compose Neo4j profile already includes APOC. For self-hosted Neo4j instances, install the APOC plugin before connecting Cognee.Troubleshooting: 'No nodes found'
Troubleshooting: 'No nodes found'
The warning
No nodes found in the database means the graph DB at the current path is empty. Common causes:Path mismatch between runs
Path mismatch between runs
For Kuzu, the graph is stored on disk at:Raw ingested files (added via
SYSTEM_ROOT_DIRECTORY defaults to a .cognee_system folder inside the installed Cognee package directory (typically inside your virtual environment). If this path resolves differently across sessions — for example, after reinstalling packages or using a different virtual environment — each session sees an empty graph.Pin it to an explicit absolute path in your .env:add()) are stored separately under DATA_ROOT_DIRECTORY, which defaults to .data_storage in the same package directory. Set both if you want fully portable storage:Data not yet processed in this session
Data not yet processed in this session
The graph persists on disk between runs — you do not need to re-run
add() + cognify() every time. Calling search() or visualize_graph() in a new session will find existing data, as long as SYSTEM_ROOT_DIRECTORY points to the same location as the original ingestion run.Graph was pruned
Graph was pruned
cognee.prune.prune_system() deletes all graph and system data. Re-run add() and cognify() to rebuild it.Vector Stores
Configure vector databases for embedding storage
Relational Databases
Set up SQLite or Postgres for metadata storage
Overview
Return to setup configuration overview