Practical overview
When it fits
Use Nano Graphrag when you need a modifiable Python foundation for text ingestion and graph-based question answering, and are prepared to configure the model and storage components for your application.
Who it is for
- Python developers building custom retrieval-augmented generation applications
- Researchers prototyping or comparing graph-based retrieval workflows
- Teams adapting model, embedding, or storage components in a knowledge-base pipeline
Documented uses
- Ingest individual or batches of text into a persistent working directory.
- Ask questions using global or local graph retrieval, or use the documented naive RAG mode.
- Add text incrementally while avoiding duplicate content processing.
- Use asynchronous insertion and query methods in an async Python workflow.
Requirements & limits
The project is publicly available as an MIT-licensed GitHub repository and documents installation through PyPI or from source.
- The README requires Python 3.9.11 or later.
- OpenAI is the built-in model and embedding option; Azure OpenAI and Amazon Bedrock have configuration guidance.
- DeepSeek, Ollama, and Sentence Transformers are referenced through examples, while FAISS and Neo4j appear among portability references.
- Incremental insertion avoids duplicate content processing, but recomputes graph communities and regenerates community reports after each insert.
- The library provides a knowledge-pipeline foundation rather than a ready-made hosted assistant.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Nano Graphrag
Add the library to a Python environment using one of the documented installation routes.
Before you start
- Python 3.9.11 or later
- A shell and Python environment
Steps
Choose installation from the package index or from a cloned repository.
For package-index installation, run the command below.
pip install nano-graphragFor source installation, clone the repository, enter its directory, and run the command below.
pip install -e .
Expected outcome
Nano Graphrag is installed in the Python environment.
Guide limitations
- This covers installation only; model credentials and application configuration are separate steps.
Insert text and query a GraphRAG knowledge base
Use the documented quick-start workflow to ingest a text file and ask global or local retrieval questions.
Before you start
- Nano Graphrag installed
- Python 3.9.11 or later
- An OpenAI API key set in the environment
- A text file to ingest
Steps
Set the
OPENAI_API_KEYenvironment variable.Create a
GraphRAGinstance with a working directory.Read a text file and pass its contents to
graph_func.insert(...).Call
graph_func.query(...)with a question, using the default global mode orQueryParam(mode="local").
Expected outcome
The script inserts the text into the working knowledge base and returns an answer to the query.
Guide limitations
- The quick-start setup uses OpenAI; other model options have separate configuration examples.
- The guide describes the documented code path and is not a claim of execution or compatibility testing.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 1 October 2026
- Original website title
- gusye1234/nano-graphrag · Official homepage title · retained in its source language
Related options
Microsoft GraphRAG — The README contrasts Nano Graphrag with Microsoft’s GraphRAG implementation, describing Nano Graphrag as smaller and easier to read or modify.

