LlamaIndex Graph Stores Integration: FalkorDB
FalkorDB is a fast, low-latency property graph database built on a sparse-matrix engine and queried with Cypher. This package provides two integrations:
FalkorDBPropertyGraphStore— the modernPropertyGraphStoreused byPropertyGraphIndexFalkorDBGraphStore— the legacy triplet-basedGraphStore
Installation
pip install llama-index-graph-stores-falkordb
Running FalkorDB
docker run -p 6379:6379 -p 3000:3000 -v $PWD/data:/data falkordb/falkordb:latest
The browser UI is then available on http://localhost:3000. A managed instance is also available on FalkorDB Cloud.
Usage
from llama_index.core import Document
from llama_index.core.indices.property_graph import PropertyGraphIndex
from llama_index.graph_stores.falkordb import FalkorDBPropertyGraphStore
graph_store = FalkorDBPropertyGraphStore(
url="redis://localhost:6379",
database="falkor", # the graph name
)
index = PropertyGraphIndex.from_documents(
[Document(text="Alice works for Acme since 2023.")],
property_graph_store=graph_store,
)
retriever = index.as_retriever(include_text=True)
print(retriever.retrieve("Who does Alice work for?"))
The store is also a context manager, so the connection is released deterministically:
with FalkorDBPropertyGraphStore(url="redis://localhost:6379") as graph_store:
graph_store.upsert_nodes([...])
Connecting to a secured instance
Any additional keyword argument is forwarded to the FalkorDB client:
graph_store = FalkorDBPropertyGraphStore(
url="redis://my-instance.falkordb.cloud:6379",
username="falkordb",
password="...",
ssl=True,
socket_timeout=30,
)
Configuration
| Argument | Default | Description |
|---|---|---|
url |
— | Connection URL, e.g. redis://localhost:6379. |
database |
"falkor" |
Name of the graph to read from and write to. |
refresh_schema |
True |
Read the graph schema on startup. |
sanitize_query_output |
True |
Strip oversized values (such as embeddings) from query results. |
create_indexes |
True |
Create the range and vector indexes used for lookups and vector search. |
timeout |
None |
Per-query timeout in milliseconds. |
Indexes
With create_indexes=True (the default) the store creates a range index on
__Entity__.id and Chunk.id, which is what makes ingestion MERGEs and id
lookups fast. A vector index on __Entity__.embedding is created lazily, the first
time a node with an embedding is written, using that embedding's dimension and
cosine similarity. vector_query uses the index when no metadata filters are
supplied and falls back to an exact scan otherwise.
If the graph already contains a vector index with a different dimension, the store logs a warning and falls back to the exact scan — recreate the index (or the graph) when you change embedding model.
Schema
refresh_schema() enumerates every label and relationship type in the graph, then
samples up to 1000 nodes per label to infer property types, and up to 1000
relationships per type to infer which labels they connect. Labels and relationship
types are therefore always complete, while the reported property types and
(:Start)-[:REL]->(:End) pairs are a best-effort sample — a combination that occurs
in fewer than 1 in 1000 relationships of its type may be missed. The embedding
property is excluded so it never reaches the text-to-Cypher prompt.
Sampling matters because PropertyGraphIndex refreshes the schema after every
ingestion batch; traversing all relationships instead would make ingestion cost grow
with the size of the graph.
Ingestion performance
Every read this store issues is scoped to __Entity__ or Chunk so FalkorDB's
label-scoped range indexes apply. This is what keeps the per-batch deduplication that
PropertyGraphIndex performs (get() twice, plus a schema refresh) from degrading
into full-graph scans as the graph grows.
Legacy graph store
from llama_index.graph_stores.falkordb import FalkorDBGraphStore
graph_store = FalkorDBGraphStore(url="redis://localhost:6379")
graph_store.upsert_triplet("Alice", "works_for", "Acme")
Testing
The tests start a throwaway FalkorDB container automatically (Docker required):
pytest tests
Set FALKORDB_TEST_URL to run them against an already running instance instead:
FALKORDB_TEST_URL=redis://localhost:6379 pytest tests
Metadata
Release files for llama-index-graph-stores-falkordb 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_graph_stores_falkordb-0.7.0.tar.gz | 16.3 kB | Without provenance | Details for llama_index_graph_stores_falkordb-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_graph_stores_falkordb-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_graph_stores_falkordb-0.7.0-py3-none-any.whl |
Total release size: 33.4 kB
Release files / llama_index_graph_stores_falkordb-0.7.0.tar.gz
| Download URL | llama_index_graph_stores_falkordb-0.7.0.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
747294d21f3feee91eff3fcd8185f4be93f31dbbead899bb1a136e54e2d7b563
|
|
BLAKE2b-256 checksum How to use checksums |
96038f8a714152635d52c20f5ecd75a8aa2a08fe888c1b7cf161c56cb2b88e38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_graph_stores_falkordb-0.7.0-py3-none-any.whl
| Download URL | llama_index_graph_stores_falkordb-0.7.0-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b898364b49e5b94b451b2b03aaa904bcb0dcee52bfe1254c2318a87811c6d22
|
|
BLAKE2b-256 checksum How to use checksums |
a8e32a61fa74175b8df5c59596ffd405cbe38278cc0acdedd0233fd01097b445
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llama-index-graph-stores-falkordb 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.