GraphAide
Build knowledge graphs from any document with LLMs and Neo4j. GraphAide is a multi-agentic system that extracts entities and relationships from diverse sources, constructs knowledge graphs, and enables natural language reasoning over them—all with minimal setup.
30-Second Example
Simplest (Recommended)
from graphaide import GraphAide, ModelConfig, get_sample_data_path
# Setup (once) - uses default Neo4j at localhost:7687
graphaide = GraphAide(
model_config=ModelConfig(
provider="openai",
model_name="gpt-4o",
api_key="sk-..."
)
)
# Extract from sample document
sample_pdf = get_sample_data_path("PNNL_About.pdf")
sample_ontology = get_sample_data_path("ontology_cyber.nt")
result = graphaide.extract(file_path=sample_pdf, ontology_path=sample_ontology)
print(f"✓ Extracted {len(result.nodes)} entities, {len(result.edges)} relationships")
With Custom Neo4j
from graphaide import GraphAide, ModelConfig, GraphDBConfig, get_sample_data_path
graphaide = GraphAide(
model_config=ModelConfig(provider="openai", model_name="gpt-4o", api_key="sk-..."),
graphdb_config=GraphDBConfig(uri="neo4j://my-server:7687", username="neo4j", password="password"),
)
sample_pdf = get_sample_data_path("PNNL_About.pdf")
result = graphaide.extract(file_path=sample_pdf)
graphaide.ingest(file_path=sample_pdf)
answer = graphaide.query("What organizations are mentioned?")
What It Does
- Extract entities & relationships from PDFs, text, images, or web data
- Ground entities to Wikidata for semantic enrichment
- Load to Neo4j for queryable knowledge graphs
- Reason over graphs with natural language questions
- Track chunk provenance for result attribution
Supported Providers
| LLM | Embedding | Vector Store |
|---|---|---|
| OpenAI, Anthropic, Google, AWS Bedrock, LMStudio | OpenAI, Sentence Transformers, AWS Bedrock | ChromaDB, Qdrant |
Documentation
📚 Full documentation: https://pnnl.github.io/GraphAide
Quick links:
- Installation — Get started in minutes
- Configuration — Set up LLMs, databases, embeddings
- Extraction Guide — Learn entity/relationship extraction
- API Reference — Complete API documentation
Install
pip install graphaide
See QUICKSTART.md for detailed setup, Docker, and environment configuration.
Use Cases
- Knowledge Graph Generation — Extract structured data from documents into queryable graphs
- Semantic Search — Find related entities and concepts across datasets
- Domain-Specific Reasoning — Answer questions requiring cross-document reasoning
- Data Integration — Merge disparate sources with automated entity grounding
- Compliance & Audit — Track relationships and dependencies with provenance
Architecture
GraphAide uses a multi-agent architecture orchestrated by LangGraph:
Document → [FileLoader] → [Extractor] → [Nodes4EdgesLoader]
→ [NodesLoader] → [EdgesLoader] → Neo4j
↓
[VectorDB] ← [Embeddings] ← RAG Context
Factory pattern manages LLMs, vector stores, and graph databases:
ModelFactory— Loads LLMs from OpenAI, Anthropic, Google, AWS Bedrock, or local LMStudioGraphDBFactory— Manages Neo4j/Neptune connectionsVectorStoreFactory— Manages ChromaDB or Qdrant vector indicesAgentFactory— Builds extraction, loading, and query agents
Agents communicate via KGGenerationState (append-only shared state with reducers):
raw_text,file_path— Input documentnodes,edges— Extracted entities and relationshipsrag_context— Ontology constraints and Wikidata metadatamessages— Status and debug info
Tested Configurations
| Provider | LLM | Embedding |
|---|---|---|
| OpenAI | gpt-4o, gpt-4o-mini | text-embedding-3-small |
| Anthropic | claude-3-5-sonnet | claude-3-5-sonnet (native) |
| AWS Bedrock | anthropic.claude-3-5-sonnet | amazon.titan-embed-text-v1 |
| LMStudio (local) | google/gemma-3-27b:2 | text-embedding-nomic-embed-text-v1.5 |
Run Modes
| Mode | Command |
|---|---|
| CLI | graphaide extract doc.pdf |
| Docker | docker compose up then docker exec |
| Python | from graphaide import GraphAide |
| REST | graphaide serve → http://localhost:8000 |
Support
Please reach out to Sumit.Purohit@pnnl.gov for any questions.
Authors and acknowledgment
Please reach out to Sumit.Purohit@pnnl.gov for any questions.
Citation
If you use GraphAide in your research, please cite:
@inproceedings{purohit2024graphaide,
title={GraphAide: Advanced Graph-Assisted Query and Reasoning System},
author={Purohit, Sumit and Chin, George and Mackey, Patrick S and Cottam, Joseph A},
booktitle={2024 IEEE International Conference on Big Data (BigData)},
pages={3485--3493},
year={2024},
organization={IEEE}
}
The research described in this paper is partially supported by the Resilience Through Data Driven, Intelligently Designed Control (RD2C) Initiative at Pacific Northwest National Laboratory (PNNL) and the United States federal government. Pacific Northwest National Laboratory is a multiprogram national laboratory operated for the US Department of Energy (DOE) by Battelle Memorial Institute under Contract No. DEAC05-76RL01830. PNNL Information Release PNNL-SA205147.
License & Legal
GraphAide is licensed under the BSD 2-Clause License (Simplified BSD).
Important: Please review the following legal documents:
- LICENSE.txt — Full license terms
- DISCLAIMER — Limitations and use restrictions
- ACKNOWLEDGMENT — Credits, funding, citations
- NOTICE — Software identification and legal notices
See the Legal section in documentation for more details.
Project status
Status: Active development
Version: 0.5.29
Last Updated: October 2026
Metadata
Release files for graphaide 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| graphaide-0.6.2.tar.gz | 5.5 MB | Without provenance | Details for graphaide-0.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| graphaide-0.6.2-py3-none-any.whl | Python 3 | none | any | Details for graphaide-0.6.2-py3-none-any.whl |
Total release size: 6.5 MB
Release files / graphaide-0.6.2.tar.gz
| Download URL | graphaide-0.6.2.tar.gz |
|---|---|
| Size | 5.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a55efbfef6e9197c8302d8d7ce5e0b8472a4ee542be62b617e0122d644e4465
|
|
BLAKE2b-256 checksum How to use checksums |
204ee3aa9370dad3578841f4b0c0279dd638747a91179e589db88a32b3bc39ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / graphaide-0.6.2-py3-none-any.whl
| Download URL | graphaide-0.6.2-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90214a5cd30e6705e18c6fed273ce9ef2e2db07d953a711dc0efda2149409ea8
|
|
BLAKE2b-256 checksum How to use checksums |
da328aaf1226c7ec052fc7239d7498168ee39f9a739b856bd2b6986cddb4644c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Security for graphaide 0.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.