> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/getzep/graphiti/llms.txt
> Use this file to discover all available pages before exploring further.

# Drivers Overview

> Understanding Graphiti's graph database driver architecture

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:

<CardGroup cols={2}>
  <Card title="Neo4j" icon="database" href="/api/drivers/neo4j">
    Industry-standard graph database with ACID transactions
  </Card>

  <Card title="FalkorDB" icon="bolt" href="/api/drivers/falkordb">
    Redis-based graph database with RedisSearch integration
  </Card>

  <Card title="Kuzu" icon="rocket" href="/api/drivers/kuzu">
    Embedded graph database optimized for analytics
  </Card>

  <Card title="Neptune" icon="aws" href="/api/drivers/neptune">
    AWS managed graph database with OpenSearch
  </Card>
</CardGroup>

## 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:

```python theme={null}
from graphiti_core.driver.driver import GraphProvider

class GraphProvider(Enum):
    NEO4J = 'neo4j'
    FALKORDB = 'falkordb'
    KUZU = 'kuzu'
    NEPTUNE = 'neptune'
```

## Transaction Support

Drivers support transactions through the `transaction()` context manager:

```python theme={null}
async with driver.transaction() as tx:
    await ops.save(driver, node, tx=tx)
```

**Neo4j** provides full ACID transaction support with automatic commit/rollback.

**FalkorDB, Kuzu, and Neptune** provide compatibility wrappers where queries execute immediately.

## Choosing a Driver

<AccordionGroup>
  <Accordion title="Neo4j - Production Workloads">
    Choose Neo4j for:

    * Production applications requiring ACID transactions
    * Distributed deployments
    * Enterprise features and support
    * Rich ecosystem of tools
  </Accordion>

  <Accordion title="FalkorDB - Redis Integration">
    Choose FalkorDB for:

    * Redis-based infrastructure
    * Real-time applications
    * RedisSearch integration
    * Multi-tenant deployments
  </Accordion>

  <Accordion title="Kuzu - Embedded Analytics">
    Choose Kuzu for:

    * Embedded applications
    * Analytical workloads
    * In-memory processing
    * Development and testing
  </Accordion>

  <Accordion title="Neptune - AWS Deployments">
    Choose Neptune for:

    * AWS-native deployments
    * Managed graph database service
    * OpenSearch integration
    * Scalable cloud workloads
  </Accordion>
</AccordionGroup>

## Common Patterns

### Initialization

Each driver has specific initialization requirements:

```python theme={null}
from graphiti_core.driver.neo4j_driver import Neo4jDriver
from graphiti_core.driver.falkordb_driver import FalkorDriver
from graphiti_core.driver.kuzu_driver import KuzuDriver
from graphiti_core.driver.neptune_driver import NeptuneDriver

# Neo4j
neo4j_driver = Neo4jDriver(
    uri="bolt://localhost:7687",
    user="neo4j",
    password="password"
)

# FalkorDB
falkor_driver = FalkorDriver(
    host="localhost",
    port=6379
)

# Kuzu
kuzu_driver = KuzuDriver(db=":memory:")

# Neptune
neptune_driver = NeptuneDriver(
    host="neptune-db://cluster-endpoint",
    aoss_host="opensearch-endpoint"
)
```

### Using with Graphiti

Pass the driver to the Graphiti constructor:

```python theme={null}
from graphiti_core import Graphiti

graphiti = Graphiti(graph_driver=driver)
```

Or use connection parameters for Neo4j:

```python theme={null}
graphiti = Graphiti(
    uri="bolt://localhost:7687",
    user="neo4j",
    password="password"
)
```

### Cleanup

Always close drivers when done:

```python theme={null}
try:
    # Use driver
    await graphiti.add_episode(...)
finally:
    await driver.close()
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Neo4j Driver" icon="database" href="/api/drivers/neo4j">
    Detailed Neo4j driver documentation
  </Card>

  <Card title="FalkorDB Driver" icon="bolt" href="/api/drivers/falkordb">
    Detailed FalkorDB driver documentation
  </Card>

  <Card title="Kuzu Driver" icon="rocket" href="/api/drivers/kuzu">
    Detailed Kuzu driver documentation
  </Card>

  <Card title="Neptune Driver" icon="aws" href="/api/drivers/neptune">
    Detailed Neptune driver documentation
  </Card>
</CardGroup>
