Skip to main content

llama-index-graph-stores-synapcores

LlamaIndex property graph store integration for SynapCores. Use it as the backend for PropertyGraphIndex and GraphRAG workflows.

pip install llama-index llama-index-graph-stores-synapcores

Quickstart

from llama_index.core import PropertyGraphIndex
from llama_index.core.readers import SimpleDirectoryReader
from llama_index.graph_stores.synapcores import SynapCoresPropertyGraphStore

# 1. docker run -p 8080:8080 -e AIDB_ACCEPT_LICENSE=1 synapcores/community:latest
graph_store = SynapCoresPropertyGraphStore(
    uri="http://localhost:8080",
    graph_name="my_kb",
    embedding_dim=1536,
)

docs = SimpleDirectoryReader("./data").load_data()
index = PropertyGraphIndex.from_documents(
    docs,
    property_graph_store=graph_store,
)

retriever = index.as_retriever()
for node in retriever.retrieve("Who founded Acme and when?"):
    print(node.text)

Configuration

Argument Default Env fallback
uri http://localhost:8080 SYNAPCORES_URI
database default SYNAPCORES_DATABASE
auth_token None SYNAPCORES_AUTH_TOKEN
graph_name llama_graph
embedding_dim 1536
overwrite False

graph_name tags every node + relation so multiple logical graphs can coexist in one engine without colliding.

Storage model

LlamaIndex type Cypher label Notes
EntityNode (name + type, e.g. "PERSON Alice") :Entity {id, name, label, properties_json, graph_name, embedding?} Embedding stored when provided
ChunkNode (source text) :Chunk {id, text, label, properties_json, graph_name, embedding?}
Relation (typed edge with properties) [:RELATION {label, properties_json, graph_name}] label is the relation type — preserved as a property so filtering by type doesn't need to parse the edge label

Free-form properties are JSON-serialized into a single properties_json field on each node/relation. Round-tripping is reliable across every engine version (>=v1.7.0.2-ce) the package supports.

What works in v0.1.0

  • upsert_nodes, upsert_relations — bulk MERGE
  • get, get_triplets — filtered fetch by id / name / property
  • get_rel_map(graph_nodes, depth=2, limit=30, ignore_rels=…) — depth-bounded BFS expansion, the load-bearing GraphRAG retrieval primitive
  • structured_query(cypher, param_map) — pass-through Cypher with named-bind translation ($entity$1)
  • vector_query(VectorStoreQuery) — cosine similarity over Chunk-node embeddings (client-side; see Performance below)
  • delete(entity_names, relation_names, properties, ids) — selective delete; refuses to wipe the entire graph without at least one selector
  • aupsert_nodes, aupsert_relations, aget_*, astructured_query, avector_query — async via asyncio.to_thread

Performance

vector_query in v0.1.0 pulls every Chunk's embedding and scores client-side — O(N) in chunk count, fine for graphs up to ~thousands of chunks. The v0.2.0 path stores chunk embeddings in a parallel SQL table with HNSW for sub-linear lookup. Native get_rel_map via variable-length path matches (MATCH p = (a)-[*1..N]-(b)) is also queued for v0.2.0 — current path is single-hop Cypher in a Python BFS.

Engine requirements

  • synapcores/community:v1.7.0.2-ce or newer (needs Cypher on /v1/query/execute — fixed in #223)

License

MIT

Release files for llama-index-graph-stores-synapcores 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-synapcores 0.1.0
File Size Uploaded
llama_index_graph_stores_synapcores-0.1.0.tar.gz 14.1 kB Details

Built distribution (wheel)

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

Total release size: 26.6 kB

Release files / llama_index_graph_stores_synapcores-0.1.0.tar.gz

Download URL llama_index_graph_stores_synapcores-0.1.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b32137cc6b59799872622b55110dfe357bc4cb38d03d7364cb7b0a1e943700fe
BLAKE2b-256 checksum
How to use checksums
9b80c0e269f79336b2242efbb70574c2be378142c47c4c47eac013cae092aebb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

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

Download URL llama_index_graph_stores_synapcores-0.1.0-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fb594e00dd349ac0f1559f5663058344c5ef5f2d0190ab5eb3195b982b25e25
BLAKE2b-256 checksum
How to use checksums
5cefa7c9654bbe7f7ce2ea5bd0475470b0d87f93057709577d7a66c1c152235e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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