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 4.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 4.0.0
File Size Uploaded
langchain_coordinode-4.0.0.tar.gz 14.5 kB Details

Built distribution (wheel)

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

Total release size: 30.5 kB

Release files / langchain_coordinode-4.0.0.tar.gz

Download URL langchain_coordinode-4.0.0.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9719ff57da7797ef53fe09e82088241110fe28b665702ae3412b8c870de7e3f3
BLAKE2b-256 checksum
How to use checksums
fbf0e45f78811c1c9f531cfd254f98acef79a7fd39c90f6eb1fb35d40c453e0a
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 Oct 7, 2026.

Transparency log

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

Download URL langchain_coordinode-4.0.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb9c3fbdc952fb49911714275827909173109e7059141aebee8170f534868ba9
BLAKE2b-256 checksum
How to use checksums
1a5d02d28866dcc2df056f35bb5e8d4ae13139776c8b0045e737ea624008e104
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 Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.0.0 This release

2 release files

3.0.0

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