Skip to main content

Installation

To use Agentic GraphRAG, install agentic-graphrag from your Python package manager, for example pip:

pip install agentic-graphrag

If you are using uv, create a virtual environment and install the package into it:

uv venv
uv pip install agentic-graphrag

To install uv, see the installation docs.

Agentic GraphRAG needs Python 3.11 or newer. It also needs a Neo4j database, version 5.23 or newer, to store the graph. The Quickstart shows how to get one for free.

The base install includes the loaders, the chunkers, the data models, and the default embedder. Storage, extraction, and the agent are extras.

Alternative PyTorch distributions

The embed-local, extract, docling, and chunk-neural extras depend on PyTorch. Depending on your hardware, pick a different distribution of torch, for example a CPU-only build or a build for another accelerator. The PyTorch install page lists all the ways to install torch.

When you install with uv, add --torch-backend=auto. uv looks for a GPU driver. It installs the build that matches the driver, or the CPU build when it finds no GPU.

uv pip install "agentic-graphrag[neo4j,extract]" --torch-backend=auto

To always install the CPU build, use --torch-backend=cpu. This flag is a uv preview feature. It needs uv 0.6.9 or newer.

What the base install includes​

The base install has the parts of Agentic GraphRAG that need no database, no GPU, and no LLM client:

  • The data models, such as the graph schema and the search result.
  • Loaders for files, directories, and raw text, including Markdown, HTML, and CSV.
  • The built-in chunkers: recursive, sentence, token, heading, parent-child, and turn-window.
  • The default embedder, which runs ONNX embedding models on the CPU.
  • The OpenTelemetry API calls that trace each step. Without the observability extra, these calls do nothing.

To build and search a graph, you also need a graph store and an extractor. Each one is an extra.

Available extras​

Other parts of Agentic GraphRAG need more third-party packages. These packages install only if you select them as extras. If an extra is missing, Agentic GraphRAG raises an error that names the extra to install.

The following table lists the extras. Install them with pip install "agentic-graphrag[NAME1,NAME2]" or uv pip install "agentic-graphrag[NAME1,NAME2]".

ExtraDescription
neo4jInstalls the Neo4j graph store and its native vector index.
embed-localInstalls Sentence Transformers, to embed with models that the default embedder does not support.
extractInstalls GLiNER 2.5, to run entity extraction on your machine.
llmInstalls BAML, to extract entities and review matches with an LLM.
agentsInstalls the LangGraph runtime for the question-answering agent.
doclingInstalls Docling, to parse PDF, Word, PowerPoint, image, and XML files and to chunk by layout.
qdrantInstalls the Qdrant vector store and BM25 sparse embeddings.
weaviateInstalls the Weaviate vector store.
milvusInstalls the Milvus and Zilliz vector store.
observabilityInstalls the OpenTelemetry SDK and OTLP exporter.
communityInstalls Leiden community detection.
evalInstalls the DeepEval and AgentEvals metrics in agrag.eval.
chunk-semanticInstalls the semantic chunker.
chunk-neuralInstalls the neural chunker.
chunk-codeInstalls the code chunker.

Extras by goal​

GoalExtras
Build a first graph (the Quickstart)neo4j,extract
Also ask questions with the agentneo4j,extract,agents
Read PDF and Office filesAdd docling
Extract with an LLM instead of a local modelneo4j,llm
Search with a dedicated vector storeAdd qdrant, weaviate, or milvus
Find communities of related entitiesAdd community
Record tracesAdd observability
Measure answer qualityAdd eval

Next steps​

Follow the Quickstart to build your first graph.