Skip to main content

langchain-coordinode

PyPI Python License CI

LangChain integration for CoordiNode — GraphStore implementation and GraphCypherQAChain support for GraphRAG pipelines.

Installation

pip install langchain-coordinode
uv add langchain-coordinode

Requirements

  • Python 3.11+
  • Running CoordiNode instance

Quick Start

GraphCypherQAChain — Question Answering over a Knowledge Graph

from langchain_coordinode import CoordinodeGraph
from langchain_classic.chains import GraphCypherQAChain
from langchain_openai import ChatOpenAI

# Connect to CoordiNode
graph = CoordinodeGraph("localhost:7080")

# Build a QA chain that generates and executes Cypher queries
chain = GraphCypherQAChain.from_llm(
    ChatOpenAI(model="gpt-4o-mini"),
    graph=graph,
    verbose=True,
)

result = chain.invoke({"query": "What concepts are related to attention mechanisms?"})
print(result["result"])

Schema Inspection

from langchain_coordinode import CoordinodeGraph

graph = CoordinodeGraph("localhost:7080")

# Refresh schema from database
graph.refresh_schema()

# Schema string used by the LLM to generate Cypher
print(graph.schema)
# Node properties: Person (name: String, age: Integer), Concept (name: String) ...
# Relationships: (Person)-[:KNOWS]->(Person), (Document)-[:ABOUT]->(Concept) ...

Direct Cypher Queries

from langchain_coordinode import CoordinodeGraph

graph = CoordinodeGraph("localhost:7080")

# Returns List[Dict[str, Any]]
result = graph.query(
    "MATCH (n:Person)-[:KNOWS]->(m) WHERE n.name = $name RETURN m.name AS colleague",
    params={"name": "Alice"},
)
for row in result:
    print(row["colleague"])

LLMGraphTransformer — Extract Knowledge from Text

from langchain_community.graphs.graph_document import GraphDocument
from langchain_openai import ChatOpenAI
from langchain_experimental.graph_transformers import LLMGraphTransformer
from langchain_coordinode import CoordinodeGraph
from langchain_core.documents import Document

graph = CoordinodeGraph("localhost:7080")
llm = ChatOpenAI(model="gpt-4o-mini", temperature=0)

transformer = LLMGraphTransformer(llm=llm)

docs = [Document(page_content="Alice knows Bob. Bob works at Acme Corp.")]
graph_docs = transformer.convert_to_graph_documents(docs)

# Store extracted entities and relationships
graph.add_graph_documents(graph_docs)

Connection Options

# host:port string
graph = CoordinodeGraph("localhost:7080")

# TLS
graph = CoordinodeGraph("db.example.com:7443", tls=True)

# Custom timeout
graph = CoordinodeGraph("localhost:7080", timeout=60.0)

API Reference

CoordinodeGraph

Method Description
query(query, params) Execute Cypher, returns List[Dict[str, Any]]
refresh_schema() Reload node/relationship schema from database
add_graph_documents(docs) Batch MERGE nodes + relationships from GraphDocument list
keyword_search(query, k, label, fuzzy, language) Full-text BM25 search — returns [{"id", "score", "snippet"}, …]
similarity_search(query_vector, k, label, property) Vector nearest-neighbour search — returns [{"id", "node", "distance"}, …]
schema Schema string for LLM context
structured_schema Structured schema dict for programmatic access
Package Description
coordinode Core gRPC client
llama-index-graph-stores-coordinode LlamaIndex PropertyGraphStore

Support

USDT TRC-20

USDT (TRC-20), maintainer's personal wallet: TFDsezHa1cBkoeZT5q2T49Wp66K8t2DmdA

License

Apache-2.0

Metadata

Release files for langchain-coordinode 3.0.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 langchain-coordinode 3.0.0
File Size Uploaded
langchain_coordinode-3.0.0.tar.gz 14.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-coordinode 3.0.0
File Interpreter ABI Platform
langchain_coordinode-3.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.3 kB

Release files / langchain_coordinode-3.0.0.tar.gz

Download URL langchain_coordinode-3.0.0.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d0c50e1e169414593cf77e0fb0fbc5489acef64658fe9bd4fdfe1d95ba3b6a78
BLAKE2b-256 checksum
How to use checksums
222b019c88d9e2832ea6cccbaf15b19b91c3a35e2cb92a0806eba0cf354c2559
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 24, 2026.

Transparency log

Release files / langchain_coordinode-3.0.0-py3-none-any.whl

Download URL langchain_coordinode-3.0.0-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e61aabcb3af87992bd07526f2a2db76178121bd59d2fee69e73f9ccbab939f7e
BLAKE2b-256 checksum
How to use checksums
efae7eb97aaf5fc3f9e6c42ef02d4efdf7bae6667e423087822b870b02b96021
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

4.0.0

2 release files

This release

3.0.0 This release

2 release files

2.1.1

2 release files

1.0.6

2 release files

1.0.5

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

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