examples/quickstart/README.md
This example demonstrates the basic functionality of Graphiti, including:
OPENAI_API_KEY environment variable)pip install graphiti-core
# Required for LLM and embedding
export OPENAI_API_KEY=your_openai_api_key
# Optional Neo4j connection parameters (defaults shown)
export NEO4J_URI=bolt://localhost:7687
export NEO4J_USER=neo4j
export NEO4J_PASSWORD=password
# Optional FalkorDB connection parameters (defaults shown)
export FALKORDB_URI=falkor://localhost:6379
# Optional Amazon Neptune connection parameters
NEPTUNE_HOST=your_neptune_host
NEPTUNE_PORT=your_port_or_8182
AOSS_HOST=your_aoss_host
AOSS_PORT=your_port_or_443
# To use a different database, modify the driver constructor in the script
TIP: For Amazon Neptune host string please use the following formats
neptune-db://<cluster endpoint>neptune-graph://<graph identifier>python quickstart_neo4j.py
# For FalkorDB
python quickstart_falkordb.py
# For Amazon Neptune
python quickstart_neptune.py
After running this example, you can:
graphiti_core.search.search_config_recipesIf you encounter the error Neo.ClientError.Database.DatabaseNotFound: Graph not found: default_db, this occurs when the driver is trying to connect to a database that doesn't exist.
Solution:
The Neo4j driver defaults to using neo4j as the database name. If you need to use a different database, modify the driver constructor in the script:
# In quickstart_neo4j.py, change:
driver = Neo4jDriver(uri=neo4j_uri, user=neo4j_user, password=neo4j_password)
# To specify a different database:
driver = Neo4jDriver(uri=neo4j_uri, user=neo4j_user, password=neo4j_password, database="your_db_name")
The edge search results include EntityEdge objects with:
The node search results include EntityNode objects with: