LlamaIndex PropertyGraphStore backed by CoordiNode
Project description
llama-index-graph-stores-coordinode
LlamaIndex PropertyGraphStore backed by CoordiNode — graph + vector + full-text in a single transactional engine.
Installation
pip install llama-index-graph-stores-coordinode
uv add llama-index-graph-stores-coordinode
Requirements
- Python 3.11+
- Running CoordiNode instance
Quick Start
PropertyGraphIndex — Build from Documents
from llama_index.core import PropertyGraphIndex, SimpleDirectoryReader
from llama_index.graph_stores.coordinode import CoordinodePropertyGraphStore
# Connect to CoordiNode
store = CoordinodePropertyGraphStore("localhost:7080")
# Build graph index from documents (auto-extracts entities + relationships)
docs = SimpleDirectoryReader("./data").load_data()
index = PropertyGraphIndex.from_documents(
docs,
property_graph_store=store,
show_progress=True,
)
# Query
engine = index.as_query_engine(include_text=True)
response = engine.query("Explain the attention mechanism in transformers")
print(response)
Load Existing Graph
from llama_index.core import PropertyGraphIndex
from llama_index.graph_stores.coordinode import CoordinodePropertyGraphStore
store = CoordinodePropertyGraphStore("localhost:7080")
# Load from existing data in CoordiNode (no re-extraction)
index = PropertyGraphIndex.from_existing(property_graph_store=store)
engine = index.as_query_engine()
response = engine.query("Who are the key researchers in graph neural networks?")
Vector + Keyword Hybrid Retrieval
from llama_index.core import PropertyGraphIndex
from llama_index.core.indices.property_graph import (
VectorContextRetriever,
LLMSynonymRetriever,
)
from llama_index.graph_stores.coordinode import CoordinodePropertyGraphStore
from llama_index.embeddings.openai import OpenAIEmbedding
store = CoordinodePropertyGraphStore("localhost:7080")
embed_model = OpenAIEmbedding(model="text-embedding-3-small")
index = PropertyGraphIndex.from_existing(
property_graph_store=store,
embed_model=embed_model,
)
# Combine vector similarity + keyword/synonym retrieval
retriever = index.as_retriever(
sub_retrievers=[
VectorContextRetriever(index.property_graph_store, embed_model=embed_model),
LLMSynonymRetriever(index.property_graph_store),
]
)
nodes = retriever.retrieve("graph attention networks")
Manual Node and Relation Upsert
from llama_index.core.graph_stores.types import EntityNode, Relation
from llama_index.graph_stores.coordinode import CoordinodePropertyGraphStore
store = CoordinodePropertyGraphStore("localhost:7080")
# Upsert entities
nodes = [
EntityNode(label="Person", name="Alice", properties={"role": "researcher"}),
EntityNode(label="Concept", name="GraphRAG", properties={"field": "AI"}),
]
store.upsert_nodes(nodes)
# Upsert relationships
relations = [
Relation(
label="RESEARCHES",
source_id="Alice",
target_id="GraphRAG",
properties={"since": 2023},
)
]
store.upsert_relations(relations)
# Query triplets
triplets = store.get_triplets(entity_names=["Alice"])
for subj, rel, obj in triplets:
print(f"{subj.name} -[{rel.label}]-> {obj.name}")
Direct Cypher
from llama_index.graph_stores.coordinode import CoordinodePropertyGraphStore
store = CoordinodePropertyGraphStore("localhost:7080")
result = store.structured_query(
"MATCH (n:Person)-[:KNOWS]->(m) WHERE n.name = $name RETURN m.name AS name",
param_map={"name": "Alice"},
)
Connection Options
# host:port string
store = CoordinodePropertyGraphStore("localhost:7080")
# TLS
store = CoordinodePropertyGraphStore("db.example.com:7443", tls=True)
# Custom timeout
store = CoordinodePropertyGraphStore("localhost:7080", timeout=60.0)
Capabilities
| Feature | Supported |
|---|---|
| Node upsert | ✅ |
| Relation upsert | ✅ |
| Triplet queries | ✅ |
| Relationship map traversal | ✅ |
| Schema inspection | ✅ |
Direct Cypher (structured_query) |
✅ |
| Vector similarity queries | ✅ (returns empty until HNSW index wiring — v0.4) |
| Async support | via AsyncCoordinodeClient |
Related Packages
| Package | Description |
|---|---|
coordinode |
Core gRPC client |
langchain-coordinode |
LangChain GraphStore + GraphCypherQAChain |
Links
Support
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_graph_stores_coordinode-0.6.0.tar.gz.
File metadata
- Download URL: llama_index_graph_stores_coordinode-0.6.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b5a6bece233fa526dcf4c3aedbd7c8d7505236ac2661785ac51d2460f5087fd
|
|
| MD5 |
ea707c565b5fecb8e25ec835b21f5afb
|
|
| BLAKE2b-256 |
cb4b2604856bb1e624989e2c3c7894668e41d6c3c2594ae3004ac62c0b4b9d17
|
Provenance
The following attestation bundles were made for llama_index_graph_stores_coordinode-0.6.0.tar.gz:
Publisher:
release.yml on structured-world/coordinode-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llama_index_graph_stores_coordinode-0.6.0.tar.gz -
Subject digest:
5b5a6bece233fa526dcf4c3aedbd7c8d7505236ac2661785ac51d2460f5087fd - Sigstore transparency entry: 1283184713
- Sigstore integration time:
-
Permalink:
structured-world/coordinode-python@14a189c432530b70ee4abb8f2faa21b221a3fc19 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/structured-world
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@14a189c432530b70ee4abb8f2faa21b221a3fc19 -
Trigger Event:
push
-
Statement type:
File details
Details for the file llama_index_graph_stores_coordinode-0.6.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_graph_stores_coordinode-0.6.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21ea9600b184e6294331d66c3580c5b6362390240219d2c47ff0b191891fc277
|
|
| MD5 |
fe9c27578b0ed940e49ff5adf8306d1f
|
|
| BLAKE2b-256 |
8c65e4f9b801972599603eb4a7bac833d19a4902255b8b9c7318301b8d42c574
|
Provenance
The following attestation bundles were made for llama_index_graph_stores_coordinode-0.6.0-py3-none-any.whl:
Publisher:
release.yml on structured-world/coordinode-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llama_index_graph_stores_coordinode-0.6.0-py3-none-any.whl -
Subject digest:
21ea9600b184e6294331d66c3580c5b6362390240219d2c47ff0b191891fc277 - Sigstore transparency entry: 1283184728
- Sigstore integration time:
-
Permalink:
structured-world/coordinode-python@14a189c432530b70ee4abb8f2faa21b221a3fc19 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/structured-world
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@14a189c432530b70ee4abb8f2faa21b221a3fc19 -
Trigger Event:
push
-
Statement type: