Metadata-Version: 2.4
Name: graphaide
Version: 0.4.4
Summary: Multi-agentic knowledge graph construction and reasoning system
Home-page: https://github.com/pnnl-int/GraphAide
Author: Sumit Purohit
Author-email: sumit.purohit@pnnl.gov
License: MIT
Project-URL: Source, https://github.com/pnnl-int/GraphAide/tree/develop
Project-URL: Documentation, https://github.com/pnnl-int/GraphAide#quickstart
Project-URL: Tracker, https://github.com/pnnl-int/GraphAide/issues
Project-URL: License, https://github.com/pnnl-int/GraphAide/blob/develop/LICENSE.txt
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: importlib-metadata==8.7.1
Requires-Dist: openai==2.15.0
Requires-Dist: langchain<1.2.0,>=1.0.7
Requires-Dist: sentence_transformers==5.2.1
Requires-Dist: langchain_community
Requires-Dist: langchain_openai
Requires-Dist: langchain-chroma
Requires-Dist: langgraph==1.0.8
Requires-Dist: langgraph-prebuilt==1.0.7
Requires-Dist: langchain-aws
Requires-Dist: botocore[crt]>=1.42.0
Requires-Dist: boto3>=1.42.0
Requires-Dist: langchain-anthropic
Requires-Dist: langchain_google_genai
Requires-Dist: langchain-mcp-adapters
Requires-Dist: langchain-neo4j==0.8.0
Requires-Dist: fastmcp==2.14.5
Requires-Dist: neo4j==6.1.0
Requires-Dist: ragas==0.4.3
Requires-Dist: pathlib==1.0.1
Requires-Dist: pypdf==6.6.2
Requires-Dist: pydantic==2.12.5
Requires-Dist: rdflib>=6.0.0
Requires-Dist: numba==0.61.2
Requires-Dist: umap-learn==0.5.11
Requires-Dist: plotly==6.5.2
Requires-Dist: kaleido==0.2.1
Requires-Dist: pandas==3.0.0
Requires-Dist: numpy==2.2.6
Requires-Dist: matplotlib==3.10.8
Requires-Dist: dash==3.4.0
Requires-Dist: py2neo==2021.2.4
Requires-Dist: autogen-agentchat==0.7.5
Requires-Dist: autogen-ext[openai]==0.7.5
Requires-Dist: python-dotenv==1.2.1
Requires-Dist: ipykernel==7.1.0
Requires-Dist: jupyterlab==4.5.3
Requires-Dist: webencodings==0.5.1
Requires-Dist: langchain-text-splitters==1.1.0
Requires-Dist: typer[all]>=0.9.0
Requires-Dist: fastapi>=0.110.0
Requires-Dist: uvicorn[standard]>=0.29.0
Requires-Dist: rich>=13.0.0
Requires-Dist: qdrant-client<=1.18.0,>=1.18.0
Requires-Dist: langchain-qdrant>=0.1.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: pdf2image>=1.16.0
Provides-Extra: testing
Requires-Dist: setuptools; extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Dynamic: license-file

# GraphAide

<p align="center">
  <img src="https://raw.githubusercontent.com/pnnl-int/GraphAide/develop/tests/notebooks/GraphAideLogo_Label_Final.png" alt="GraphAide Logo" width="400">
</p>

GraphAide is an advanced multi-agentic query and reasoning system that constructs knowledge graphs (KG) from diverse sources and enables querying and reasoning over the resulting graphs. It harnesses both knowledge graphs and LLMs to rapidly develop domain-specific digital assistants.

## Technical Summary

GraphAide v2 is a multi-agent system that uses LangGraph for workflow orchestration, LLMs for entity/relationship extraction, Neo4j for graph storage, and ChromaDB for vector embeddings.

The codebase follows a factory pattern: `ModelFactory`, `GraphDBFactory`, `VectorStoreFactory`, and `AgentFactory` create and inject dependencies into specialized agents. Agents communicate through shared state objects (`KGGenerationState`) that track nodes, edges, and messages as data flows through the pipeline.

**Project Structure:**
- `src/graphgen/v2/` - Core modules (factories, state, workflows)
- `src/graphgen/v2/agents/` - Agent implementations (extractor, loaders, visualizers)
- `templates/` - Prompt templates for each agent
- `tests/notebooks/` - Demo notebooks and test data

**Tested Models:**

| Provider | LLM | Embedding |
|----------|-----|-----------|
| LMStudio (local) | `google/gemma-3-27b:2` | `text-embedding-nomic-embed-text-v1.5` |
| AWS Bedrock | `anthropic.claude-3-5-sonnet-20241022-v2:0` | `amazon.titan-embed-text-v1` |
| OpenAI | `gpt-4o` | `text-embedding-3-small` |

## Quick Start

📚 **Documentation:**
- **[QUICKSTART.md](QUICKSTART.md)** - Installation, setup, and first examples
- **[ARCHITECTURE.md](ARCHITECTURE.md)** - Deep technical overview (factories, agents, state, workflows)
- **[REFERENCE.md](REFERENCE.md)** - Complete CLI/API reference and feature matrix
- **[CLAUDE.md](CLAUDE.md)** - Guide for Claude AI Code (developers only)

## Installation

```bash
# From project root
pip install .

# With Docker
docker compose up -d
```

## Deployment Scripts

### Linux/Mac/WSL
```bash
./graphaide_docker_build.sh 2.0.1              # Build production + dev images
./start-graphaide-prod.sh                      # Start production services
./start-graphaide-dev.sh                       # Start development services
```

### Windows (PowerShell)
```powershell
.\scripts\windows\graphaide_docker_build.ps1 2.0.1        # Build images
.\scripts\windows\start-graphaide-prod.ps1                # Start production
.\scripts\windows\start-graphaide-dev.ps1                 # Start development
```

**Note:** For Windows users, we recommend using WSL (Windows Subsystem for Linux) with the bash scripts above. Native PowerShell scripts are available in `scripts/windows/` for reference.

## Usage

**Ways to Run GraphAide:**

| Mode | Description |
|------|-------------|
| **CLI (Host)** | `graphaide extract`, `graphaide query`, etc. |
| **CLI (Docker)** | Run inside container via `docker exec` |
| **Python API** | Import `WorkflowManager` for programmatic access |
| **REST API** | FastAPI endpoints at http://localhost:8000 |

**Getting Started:**
- Start with [QUICKSTART.md](QUICKSTART.md) for 5-minute setup
- Run `graphaide extract document.pdf` to test locally
- See `tests/notebooks/demoGraphAide.ipynb` for advanced examples

## 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:

```bibtex
@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
Please refer LICENSE and DISCLAIMER files for details.


## Project status
Active development
