Skip to main content

Requirements

Before installing Graphiti, ensure you have:
  • Python 3.10 or higher
  • A graph database (one of the following):
    • Neo4j 5.26+
    • FalkorDB 1.1.2+
    • Kuzu 0.11.2+
    • Amazon Neptune Database Cluster or Neptune Analytics Graph
  • An LLM provider API key (OpenAI recommended)
Graphiti works best with LLM services that support Structured Output (such as OpenAI and Gemini). Using other services may result in incorrect output schemas and ingestion failures, particularly with smaller models.

Basic Installation

Install Graphiti using your preferred package manager:
pip install graphiti-core
The basic installation includes:
  • Neo4j driver support (default)
  • OpenAI LLM and embedding support
  • Core dependencies (Pydantic, tenacity, numpy)

Graph Database Backends

Graphiti supports multiple graph database backends through optional dependencies.
Neo4j is the default backend and is included in the basic installation.

Setup

1

Install Neo4j Desktop

Download and install Neo4j Desktop for a user-friendly interface to manage Neo4j instances.
2

Create a Database

In Neo4j Desktop:
  1. Create a new project
  2. Add a local DBMS
  3. Set a password
  4. Start the DBMS
3

Configure Connection

from graphiti_core import Graphiti

graphiti = Graphiti(
    uri="bolt://localhost:7687",
    user="neo4j",
    password="your_password"
)
Neo4j Desktop provides a browser interface at http://localhost:7474 for visualizing your knowledge graph.

LLM Providers

Graphiti supports multiple LLM providers. OpenAI is the default and recommended option.
OpenAI is included in the basic installation and is the default LLM provider.

Setup

export OPENAI_API_KEY=your_openai_api_key
from graphiti_core import Graphiti

# Uses OpenAI by default
graphiti = Graphiti(uri, user, password)
Graphiti defaults to using gpt-4o-mini for inference and text-embedding-3-small for embeddings.

Optional Dependencies

Graphiti offers several optional dependencies for extended functionality:

Voyage AI Embeddings

Use Voyage AI for state-of-the-art embeddings:
pip install graphiti-core[voyageai]

Sentence Transformers

Use local embedding models:
pip install graphiti-core[sentence-transformers]

OpenTelemetry Tracing

Enable distributed tracing for observability:
pip install graphiti-core[tracing]

Multiple Extras

Install multiple optional dependencies at once:
pip install graphiti-core[falkordb,anthropic,google-genai,voyageai]

Performance Tuning

Concurrency Control

Graphiti’s ingestion pipelines support high concurrency. Control this with the SEMAPHORE_LIMIT environment variable:
# Default (low concurrency to avoid rate limits)
export SEMAPHORE_LIMIT=10

# Higher concurrency for better performance (if your LLM provider allows)
export SEMAPHORE_LIMIT=50

# Lower concurrency to avoid 429 rate limit errors
export SEMAPHORE_LIMIT=5
By default, SEMAPHORE_LIMIT is set to 10 to help prevent 429 rate limit errors from your LLM provider. Increase this value if your provider supports higher throughput.

Environment Variables

Common environment variables for Graphiti:
.env
# LLM Provider
OPENAI_API_KEY=your_openai_api_key

# Neo4j Connection
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=password

# FalkorDB Connection
FALKORDB_HOST=localhost
FALKORDB_PORT=6379
FALKORDB_USERNAME=  # Optional
FALKORDB_PASSWORD=  # Optional

# Amazon Neptune
NEPTUNE_HOST=neptune-db://your-cluster-endpoint
NEPTUNE_PORT=8182
AOSS_HOST=your-opensearch-host
AOSS_PORT=443

# Performance
SEMAPHORE_LIMIT=10

# Telemetry (opt-out)
GRAPHITI_TELEMETRY_ENABLED=false

Telemetry

Graphiti collects anonymous usage statistics to improve the framework. This includes:
  • System information (OS, Python version)
  • Graphiti version
  • Provider choices (LLM, database, embedder)
Data NOT collected:
  • Personal information or identifiers
  • API keys or credentials
  • Your data, queries, or graph content
  • IP addresses or hostnames

Disable Telemetry

To opt out of telemetry:
export GRAPHITI_TELEMETRY_ENABLED=false
Or in your Python code:
import os
os.environ['GRAPHITI_TELEMETRY_ENABLED'] = 'false'
Telemetry is automatically disabled during test runs when pytest is detected.

Verify Installation

Verify your installation with this simple script:
verify.py
import asyncio
from graphiti_core import Graphiti
from graphiti_core.nodes import EpisodeType
from datetime import datetime, timezone

async def verify():
    # Initialize Graphiti (adjust connection parameters)
    graphiti = Graphiti(
        "bolt://localhost:7687",
        "neo4j",
        "password"
    )
    
    try:
        # Add a test episode
        await graphiti.add_episode(
            name="Test Episode",
            episode_body="Test content",
            source=EpisodeType.text,
            reference_time=datetime.now(timezone.utc)
        )
        print("✓ Installation verified successfully!")
    finally:
        await graphiti.close()

if __name__ == "__main__":
    asyncio.run(verify())

Next Steps

Quickstart

Build your first knowledge graph

Core Concepts

Learn about episodes, nodes, and edges

Search Guide

Master hybrid search and reranking

Examples

Explore example projects

Build docs developers (and LLMs) love