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.1

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.1
File Size Uploaded Provenance
langchain_coordinode-4.0.1.tar.gz 14.5 kB With provenance Details

Built distribution (wheel)

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

Total release size: 30.5 kB

Release files / langchain_coordinode-4.0.1.tar.gz

Download URL langchain_coordinode-4.0.1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
490ab102e0e61dbe2af31881bc766d5263e6924f68265996f5fb81c86f441618
BLAKE2b-256 checksum
How to use checksums
6e4276fcef373c55956137dc6ffd04038debcb8495014ca224edf3685c24dc36
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 17, 2026.

Transparency log

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

Download URL langchain_coordinode-4.0.1-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74fb5c028fe8468f0cfa2b562496293e6e8b55173f59cfe1b7ba2a721e5056e7
BLAKE2b-256 checksum
How to use checksums
4e0d8a36a9d7ffca7312830b9c0b60e8be14fb6d7d7c2ca0d212ca53065872e0
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 17, 2026.

Transparency log

Security for langchain-coordinode 4.0.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_coordinode-4.0.1.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 Oct 17, 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.

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