Skip to main content

llama-index-graph-stores-rushdb

A LlamaIndex property graph store on RushDB: build a PropertyGraphIndex from your documents and keep the knowledge graph in RushDB, self-hosted or on RushDB Cloud.

  • Real labels, no schema to declare. Every extracted entity is stored under its own label (PERSON, COMPANY, …) and every relation as a typed relationship. Nothing is collapsed into a generic Entity node, and no table or label has to be created first.
  • Vectors in the same database. Entity and chunk embeddings go to RushDB vector indexes, so VectorContextRetriever searches and traverses in one place, with metadata filters.
  • A schema derived from the data. get_schema_str() returns what is actually stored: labels with counts, typed properties with value ranges, and relationship patterns such as (PERSON)-[:WORKS_AT]->(COMPANY). That is what text-to-Cypher prompts are given.

Install

pip install llama-index-graph-stores-rushdb

Requires Python 3.10+, llama-index-core 0.13 or 0.14, and RushDB 3.x: a self-hosted engine 3.0.10 or later, or RushDB Cloud.

Connect

Start a local engine (other ways to run it):

docker run -p 3000:3000 -e RUSHDB_TOKEN=change-me rushdb/rushdb:3 --languages sql,cypher

Then point the store at it, or at RushDB Cloud, through the environment:

# Self-hosted engine
export RUSHDB_ENGINE_URL=http://127.0.0.1:3000 RUSHDB_ENGINE_TOKEN=change-me
# and RUSHDB_SCOPE=<tenant> on a multitenant engine

# or RushDB Cloud
export RUSHDB_API_KEY=...

or pass a client yourself:

from rushdb import RushDB
from llama_index.graph_stores.rushdb import RushDBPropertyGraphStore

graph_store = RushDBPropertyGraphStore(
    RushDB("change-me", direct=True, engine_url="http://127.0.0.1:3000")
)

Quick start

from llama_index.core import PropertyGraphIndex, SimpleDirectoryReader
from llama_index.core.indices.property_graph import SchemaLLMPathExtractor
from llama_index.embeddings.openai import OpenAIEmbedding
from llama_index.llms.openai import OpenAI
from llama_index.graph_stores.rushdb import RushDBPropertyGraphStore

graph_store = RushDBPropertyGraphStore()  # RUSHDB_* from the environment
llm = OpenAI(model="gpt-4o-mini")

index = PropertyGraphIndex.from_documents(
    SimpleDirectoryReader("./data").load_data(),
    property_graph_store=graph_store,
    kg_extractors=[
        SchemaLLMPathExtractor(
            llm=llm,
            possible_entities=["PERSON", "COMPANY", "PRODUCT"],
            possible_relations=["WORKS_AT", "FOUNDED", "MAKES"],
        )
    ],
    embed_model=OpenAIEmbedding(model_name="text-embedding-3-small"),
)

print(index.as_query_engine(llm=llm).query("Who founded the companies that make our products?"))

examples/quickstart.py is the same flow as a script.

How the graph is stored

LlamaIndex RushDB
EntityNode(name, label, properties) A record under label, with id, name and the properties
ChunkNode (a text chunk) A record under chunk_label (Chunk), with id, text and the chunk's metadata
Relation(label, source_id, target_id, properties) A relationship of type label, with the properties on the edge
An entity extracted from a chunk A MENTIONS relationship from the chunk to the entity
An embedding An external vector index per label: on name for entities, on text for chunks

Every record the store writes carries _kg_kind (entity or chunk), so the graph can share a RushDB project with other data. Nodes are matched by id: upserting a node updates it in place, and a node that first appeared only as a relation endpoint (label entity) takes its real label when the node itself arrives.

Retrievers

Retriever Works Notes
VectorContextRetriever yes Vector search over every entity label, then the paths around the hits
LLMSynonymRetriever yes Looks entities up by id, then the paths around them
TextToCypherRetriever, CypherTemplateRetriever with enable_cypher=True Needs Cypher on the engine (--languages ...,cypher); RushDB's Cypher support is a release candidate
from llama_index.core.indices.property_graph import VectorContextRetriever

retriever = index.as_retriever(
    sub_retrievers=[VectorContextRetriever(graph_store, embed_model=embed_model, path_depth=2)]
)

vector_query supports metadata filters with ==, !=, >, >=, <, <=, in, nin, contains (an element of a list), text_match (substring) and is_empty, combined with and, or and not.

Notes

  • A node has one label. Upserting a node under a different label relabels it.
  • A relation is created once per (source, type, target); upserting it again keeps the first properties, as the Neo4j store does.
  • Objects in properties, and lists of objects, are stored as JSON text (RushDB would otherwise ingest a nested object as a related record). ISO 8601 date strings are stored as datetimes.
  • Deleting a node removes its relationships; its neighbours stay.
  • persist() does nothing: the graph is already in RushDB.

Development

uv sync
scripts/start-engines.sh   # two local engines in Docker: single-tenant and multitenant
export RUSHDB_TEST_ENGINE_URL=http://127.0.0.1:3917 RUSHDB_TEST_ENGINE_TOKEN=test-token
export RUSHDB_TEST_MT_ENGINE_URL=http://127.0.0.1:3918 RUSHDB_TEST_MT_ENGINE_TOKEN=test-token
uv run pytest
uv run ruff check . && uv run ruff format --check . && uv run mypy llama_index

The integration tests compare the store with LlamaIndex's in-memory SimplePropertyGraphStore where the two define the same behaviour, and run a PropertyGraphIndex end to end with a deterministic extractor. CI runs them on both self-hosted engines, on Python 3.10 and 3.13 and on the lowest supported dependency versions. Set RUSHDB_TEST_API_KEY to a RushDB Cloud project used only for testing to run them there too: the tests delete the store's records in it.

License

Apache-2.0

Metadata

Release files for llama-index-graph-stores-rushdb 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-graph-stores-rushdb 0.1.0
File Size Uploaded Provenance Actions
llama_index_graph_stores_rushdb-0.1.0.tar.gz 21.4 kB With provenance Details for llama_index_graph_stores_rushdb-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-graph-stores-rushdb 0.1.0
File Interpreter ABI Platform Actions
llama_index_graph_stores_rushdb-0.1.0-py3-none-any.whl Python 3 none any Details for llama_index_graph_stores_rushdb-0.1.0-py3-none-any.whl

Total release size: 37.6 kB

Release files / llama_index_graph_stores_rushdb-0.1.0.tar.gz

Download URL llama_index_graph_stores_rushdb-0.1.0.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e00683175ffb2da15620ea8527c828c9dacb44f36e759d4ce1e2619b509acc5d
BLAKE2b-256 checksum
How to use checksums
a7dc50d4b31fdf7a4979e8ed8224a07be5f0cd8bc7dbe53edd7250e1fad00fd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / llama_index_graph_stores_rushdb-0.1.0-py3-none-any.whl

Download URL llama_index_graph_stores_rushdb-0.1.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef21c8d2c98e27994dc9d89eb11d91d5f5752c48c5f1df96d823961c6dcb439a
BLAKE2b-256 checksum
How to use checksums
0a412924048f235658d7eabfe38c54cb95f60bdc0909282c770688f3c7b763c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for llama-index-graph-stores-rushdb 0.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llama_index_graph_stores_rushdb-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page