Skip to main content
Version: latest

Graph storage

Agentic GraphRAG supports Neo4j and FalkorDB. By default, either backend holds the graph, embeddings, native vector indexes, and full-text indexes in one database. You can instead store vectors exclusively in one external vector store per graph: Qdrant, Milvus, or Weaviate. The graph database still holds all graph data, and the graph is the source of truth. A separate vector database is not required for graph-native placement.

Vector placement​

One placement covers chunk, entity, resolved entity, and community vectors. Graph.open records the store, collection prefix, embedding dimensions, and distance metric in the graph and rejects a different placement on reopening. With external placement, graph nodes have no embedding property and the graph has no vector indexes. The graph still holds source data and full-text indexes. Searches join external ids back to graph nodes to enforce visibility and scope.

Placement stays fixed for a graph. Changing stores means re-ingesting into a separate graph. Choose where vectors live to configure Qdrant, Milvus, or Weaviate and repair missing vectors after a failed write.

Choose a backend​

Both backends support document ingestion and updates, entity resolution, community summaries, lexical and semantic search, hybrid retrieval, evidence and citations, conversation history, and decision traces. The Python library, built-in agent, and MCP server use the same graph-store interface.

ChoiceNeo4jFalkorDB
ServerNeo4j 5.23 or later, self-hosted or AuraFalkorDB 4.22.2 or later, with RESULTSET_SIZE -1
Python extraneo4jfalkordb
ConnectionBolt protocol, NEO4J_* settingsRedis protocol, FALKORDB_* settings
Multi-statement writesrun_in_transaction commits or rolls back the callback's writes togetherStatements run in order, with no rollback of earlier statements
Lexical rankingNeo4j's native full-text index scores matchesNative TF-IDF score plus 1.0, preserving the native ranking
Vector metricsCosine and euclideanCosine and euclidean

Use Neo4j when you need rollback across a multi-statement write or already operate Neo4j or Aura. Use FalkorDB when you want a Redis-protocol graph server and can account for its partial-write behavior. Identical search requests can return different rankings because the native indexes differ.

Configure storage backends to install a driver, start a server, and connect from Python or MCP. Changing the selected backend connects to a different database. It does not move an existing graph or its indexes.

Why it exists​

A graph and a vector index answer different questions. The graph stores relations and provenance, while a vector index finds text or entities that are semantically close to a query. Search joins vector results back to the graph records, so each hit keeps its document and provenance.

Keeping both in the selected graph store means graph records and vectors share one database, but an ingestion call is not one transaction. A cutover job stages writes and makes them visible at commit. Search reads graph data and vectors from the same database. FalkorDB's commit recovery and retry limits still apply.

How it works​

  1. Write. Graph.add writes documents with their sections, tables and figures, chunks, entities, and relations to the selected graph store. It writes embeddings onto graph nodes for graph-native placement, or to the configured external vector store (Qdrant, Milvus, or Weaviate) for external placement.
  2. Search. Graph-native placement uses the graph store's full-text and vector indexes. External placement searches the vector store and joins its hits back to graph nodes. Hybrid search there combines semantic and lexical (BM25) rankings inside that store.
  3. Read. Search reads the full items back from the store.

The store​

HoldsSearches
Source-file records, documents, sections, tables, figures, chunks, entities, resolved entities, relations, communities, tasks, events, decisions, and indexesLexical, semantic, and hybrid search, graph walks, and read-only graph queries

The database stores source-file records and extracted content, not a backup of the original files. Keep the original files separately.

Embedders​

An embedder turns text into a vector. The default embedder runs a FastEmbed model on your machine. The default model produces 384 values per text.

Graph.open compares the embedder's dimension with the store's vector indexes. It raises an error when they differ, before it writes any vector. Use the same embedding model for ingestion and retrieval.