OpenViSTAI · Agents · Blockchain · Crypto
Menu
RAG & Knowledge Systems

Nano Graphrag

Nano Graphrag is an open-source Python library for building GraphRAG knowledge-retrieval systems. It ingests text, creates graph-based knowledge representations, and supports global, local, or naive RAG queries, with synchronous and asynchronous methods.

Independent OpenViST project profile, based on linked sources.

Nano Graphrag — OpenViST project profile in RAG & Knowledge Systems.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Choose installation from the package index or from a cloned repository.

  2. For package-index installation, run the command below.

    Documented command
    pip install nano-graphrag
  3. For source installation, clone the repository, enter its directory, and run the command below.

    Documented command
    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.
Source-based practical guide

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

  1. Set the OPENAI_API_KEY environment variable.

  2. Create a GraphRAG instance with a working directory.

  3. Read a text file and pass its contents to graph_func.insert(...).

  4. Call graph_func.query(...) with a question, using the default global mode or QueryParam(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.
Evidence and transparency

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.