A lightweight knowledge-graph RAG framework and server that indexes documents into entities and relations for retrieval-augmented LLM answers.
FalkorDB/GraphRAG-SDK
Python SDK for building GraphRAG apps on FalkorDB, using a knowledge graph to retrieve connected context for LLM answers with source provenance.
- Stars
- 1,034
- Forks
- 147
- Open issues
- 67
- Last commit
- 2 days ago
What is it?
GraphRAG SDK is a Python framework for building retrieval-augmented generation applications on top of FalkorDB. It extracts entities and relations from documents into a knowledge graph, then answers questions by traversing those relationships alongside vector and full-text search. This helps with multi-hop questions whose facts are spread across several chunks, which plain vector similarity often misses.
The SDK records MENTIONED_IN edges that link entity mentions back to their source chunks, and can return the retrieval context with each answer so an application can check generated claims or decline to answer when evidence is missing. An optional ontology constrains which entity and relation types are extracted. Each graph_name isolates a tenant's data.
The SDK supports incremental updates through update, delete_document and apply_changes, which re-sync only changed files, and it accepts PDF input when the pdf extra is installed. LLM and embedding providers are configured through LiteLLM or custom provider classes. It requires a FalkorDB server version 4.20 or later.
Key features
- 01Extracts entities and relations from text and PDFs into a FalkorDB knowledge graph.
- 02Combines graph traversal, vector search, full-text search and text-to-Cypher retrieval.
- 03Links entity mentions to source chunks with MENTIONED_IN edges for traceable answers.
- 04Supports an optional schema to constrain extracted entity and relation types.
- 05Provides incremental document updates and deletions for CI-driven graph syncs.
- 06Isolates data per tenant through graph_name.
Use cases
- Building a question-answering bot over internal documents where answers must cite sources.
- Answering multi-hop questions that require connecting facts across many documents.
- Keeping a knowledge graph in sync with a git repository by re-ingesting changed files on PR merge.
- Adding grounded answers with abstention to applications where hallucinations are costly.
Quick start
- 1
Install the SDK with LiteLLM support
pip install graphrag-sdk[litellm] - 2
Start a FalkorDB server (version 4.20 or later) in Docker
docker run -d -p 6379:6379 -p 3000:3000 --name falkordb falkordb/falkordb:v4.22.2 - 3
Set your OpenAI API key in the environment
export OPENAI_API_KEY="sk-..." - 4
Ingest a document, finalize, and query it using the Python example in the README
Things to know
- Requires a running FalkorDB server, version 4.20 or later.
- Ingestion and answer generation need an LLM API key, such as OpenAI's.
Topics
FAQ
- What is GraphRAG-SDK?
- Python SDK for building GraphRAG apps on FalkorDB, using a knowledge graph to retrieve connected context for LLM answers with source provenance. GraphRAG SDK is a Python framework for building retrieval-augmented generation applications on top of FalkorDB. It extracts entities and relations from documents into a knowledge graph, then answers questions by traversing those relationships alongside vector and full-text search. This helps with multi-hop questions whose facts are spread across several chunks, which plain vector similarity often misses.
- Is GraphRAG-SDK free to use? What license does it have?
- GraphRAG-SDK is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is GraphRAG-SDK still maintained?
- Actively maintained. The last commit to GraphRAG-SDK was on Nov 5, 2026.
- What can I use GraphRAG-SDK for?
- Building a question-answering bot over internal documents where answers must cite sources. Answering multi-hop questions that require connecting facts across many documents. Keeping a knowledge graph in sync with a git repository by re-ingesting changed files on PR merge. Adding grounded answers with abstention to applications where hallucinations are costly.
- How do I install GraphRAG-SDK?
- Install the SDK with LiteLLM support: pip install graphrag-sdk[litellm] Start a FalkorDB server (version 4.20 or later) in Docker: docker run -d -p 6379:6379 -p 3000:3000 --name falkordb falkordb/falkordb:v4.22.2 Set your OpenAI API key in the environment: export OPENAI_API_KEY="sk-..." Ingest a document, finalize, and query it using the Python example in the README
- Where can I get GraphRAG-SDK?
- The source code and installation instructions are on GitHub: https://github.com/FalkorDB/GraphRAG-SDK
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Official first-party Python package for building GraphRAG applications that combine Neo4j graph databases with LLMs and vector search.
Web app that uses LLMs and LangChain to turn PDFs, docs, videos and web pages into a knowledge graph stored in Neo4j.
A graph database that stores adjacency as sparse matrices and queries with OpenCypher, aimed at knowledge graphs for LLM and GraphRAG workloads.
Open-source GraphRAG and agent framework that answers multi-hop questions over a knowledge graph with citations, running locally via Ollama or in the cloud.
Open-source AI memory platform that turns documents, code and conversations into a self-hosted knowledge graph for AI agents.