Skip to main content
Graphiti supports multiple graph database backends through a unified driver interface. Each driver implements the GraphDriver abstract base class, providing consistent access to graph operations across different database providers.

Supported Drivers

Graphiti currently supports four graph database backends:

Neo4j

Industry-standard graph database with ACID transactions

FalkorDB

Redis-based graph database with RedisSearch integration

Kuzu

Embedded graph database optimized for analytics

Neptune

AWS managed graph database with OpenSearch

Driver Architecture

All drivers inherit from the GraphDriver abstract base class and implement:

Core Methods

  • execute_query(cypher_query, **kwargs) - Execute Cypher queries
  • session(database) - Create a database session
  • transaction() - Context manager for transactions
  • close() - Close driver connections
  • build_indices_and_constraints() - Initialize database schema

Operations Properties

Each driver provides access to specialized operation interfaces:
  • entity_node_ops - Entity node operations
  • episode_node_ops - Episode node operations
  • community_node_ops - Community node operations
  • saga_node_ops - Saga node operations
  • entity_edge_ops - Entity edge operations
  • episodic_edge_ops - Episodic edge operations
  • community_edge_ops - Community edge operations
  • has_episode_edge_ops - Has-episode edge operations
  • next_episode_edge_ops - Next-episode edge operations
  • search_ops - Search operations
  • graph_ops - Graph maintenance operations

Provider Types

The GraphProvider enum defines available providers:

Transaction Support

Drivers support transactions through the transaction() context manager:
Neo4j provides full ACID transaction support with automatic commit/rollback. FalkorDB, Kuzu, and Neptune provide compatibility wrappers where queries execute immediately.

Choosing a Driver

Choose Neo4j for:
  • Production applications requiring ACID transactions
  • Distributed deployments
  • Enterprise features and support
  • Rich ecosystem of tools
Choose FalkorDB for:
  • Redis-based infrastructure
  • Real-time applications
  • RedisSearch integration
  • Multi-tenant deployments
Choose Kuzu for:
  • Embedded applications
  • Analytical workloads
  • In-memory processing
  • Development and testing
Choose Neptune for:
  • AWS-native deployments
  • Managed graph database service
  • OpenSearch integration
  • Scalable cloud workloads

Common Patterns

Initialization

Each driver has specific initialization requirements:

Using with Graphiti

Pass the driver to the Graphiti constructor:
Or use connection parameters for Neo4j:

Cleanup

Always close drivers when done:

Next Steps

Neo4j Driver

Detailed Neo4j driver documentation

FalkorDB Driver

Detailed FalkorDB driver documentation

Kuzu Driver

Detailed Kuzu driver documentation

Neptune Driver

Detailed Neptune driver documentation