langchain-graph-retriever
LangChain retriever for traversing document graphs on top of vector-based similarity search.
What it is and what it does
LangChain Graph Retriever extends LangChain's retriever framework by combining vector-based similarity search with graph traversal. Instead of treating documents as isolated results, it models them as nodes in a graph and explores relationships between them using strategies like breadth-first search or Maximal Marginal Relevance. This is useful for retrieval-augmented generation (RAG) systems where document relationships matter—for example, retrieving not just the most similar document but also semantically related neighbors.
The package depends on LangChain's core abstractions (langchain-core), graph utilities (networkx), and standard Python libraries (pydantic, immutabledict, typing-extensions). It supports both synchronous and asynchronous retrieval workflows and integrates with multiple vector stores. The codebase is in Beta status and has not seen active development recently, though the repository remains maintained.
Use it for:
- Build RAG pipelines that retrieve semantically related document clusters instead of isolated top-k results.
- Explore document relationships in knowledge graphs where metadata edges define connections between records.
- Implement graph-aware search in applications like research paper discovery or knowledge base navigation.
- Combine vector similarity with graph structure to improve retrieval relevance in multi-hop reasoning tasks.
- Integrate graph traversal into LangChain agents that need to explore connected document sets.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Retrieves documents from a graph structure using vector similarity search, combining graph traversal strategies with LangChain's retriever framework for efficient document discovery.
Yes, if you need graph-aware document retrieval in a LangChain application and are comfortable with a Beta-status library that has not been actively developed for several months. The package has low install friction, permissive licensing, and no known vulnerabilities. However, verify that the graph traversal strategies and vector store adapters you need are production-ready before deploying to critical systems.
Install
langchain-graph-retriever on PyPI
pip
pip install langchain-graph-retrieveruv
uv add langchain-graph-retrieverpoetry
poetry add langchain-graph-retrieverInstalling langchain-graph-retriever
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—last commit was 2025-05-05 and the package is 497 days past its initial release, though the repository remains active and not archived.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install langchain-graph-retriever
from langchain_graph_retriever import GraphRetriever
from langchain_core.vectorstores import Chroma
vector_store = Chroma(embedding_function=your_embedding_function)
retriever = GraphRetriever(store=vector_store, edges=[("keywords", "keywords")])
documents = retriever.retrieve("What is the capital of France?")
Requires Python 3.10 or later; also requires a configured vector store (e.g., Chroma) and an embedding function.
Verify before relying
- Whether graph traversal strategies (Eager, MMR) are fully documented and production-ready.
- Performance characteristics when working with large document graphs.
- Support status for the listed vector store adapters (AstraDB, Cassandra, Chroma, OpenSearch).
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — backoff, graph-retriever, immutabledict, langchain-core, networkx, pydantic, typing-extensions |
| Maintenance | aging — 497 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 186,653/month — #9,979 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langchain_graph_retriever-0.8.0-py3-none-any.whl
Keywords: RAG, graph RAG, langchain
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
deepsearch-glmExtracts entities, relations, and linguistic…
permissive · top 15,000 on PyPI
graph-retrieverCombines vector similarity search with graph…
permissive · top 15,000 on PyPI
ragstack-ai-knowledge-storeStores and retrieves LangChain documents using…
unclear · top 15,000 on PyPI
langchain-plaidIntegrates NextPlaid, a ColBERT-style…
permissive · top 15,000 on PyPI
langchain-milvusIntegrates LangChain with Milvus vector…
permissive · top 15,000 on PyPI
langchain-chromaConnects LangChain applications to Chroma, a…
permissive · top 5,000 on PyPI
langchain-mongodbConnects MongoDB Atlas Vector Search to…
unclear · top 5,000 on PyPI
langchain-oracledbIntegrates Oracle Database with LangChain to…
unclear · top 15,000 on PyPI
lightrag-hkuLightRAG is a retrieval-augmented generation…
permissive · top 15,000 on PyPI
kuzuKuzu is an embedded graph database that…
permissive · top 15,000 on PyPI