EXEIO project โ authored and maintained by ExeioS33 / EXEIO.
Industrialized API server for MemGraphRAG: a memory-enhanced GraphRAG engine with a three-layer memory (schema / fact / passage), conflict-aware construction, and Personalized PageRank retrieval.
This repository (memgraphrag; remote exeio-memgraphrag) packages the research engine as a LightRAG-style production service: FastAPI REST API, pluggable storage (PostgreSQL + pgvector, Neo4j + GDS), OpenAI-compatible LLM/embedding bindings, Docling-capable file processing, Docker Compose, and uv-based tooling.
# Install (requires uv)
uv sync --extra api
# Copy and edit environment
cp env.example .env
# Run API server (file-based defaults; no external DB required)
uv run memgraphrag-server
# Or full stack (API image tagged exeio-memgraphrag:<version>)
docker compose up -d --build
# Optional: CLI + Streamlit clients (talk to the running API)
uv sync --extra client
uv run memgraphrag-cli health
uv run streamlit run memgraphrag/client/app.pyAPI docs: http://localhost:9621/docs
Clients guide: docs/Clients.md.
Compose image: exeio-memgraphrag:0.1.0 (also :latest). Direct deps are exact-pinned in pyproject.toml; full tree is locked in uv.lock.
Optional emoji-heavy UI for query, ingest, param optimization, and graph exploration (talks to the running API โ not baked into the service image):
flowchart TB
subgraph API["API layer (FastAPI)"]
DOC[documents]
QRY[query]
GRPH[graph]
OLL[ollama]
end
subgraph FP["File processing"]
PAR["Parsers: legacy / Docling"]
CHK["Chunkers: F / R / P"]
end
subgraph ENG["MemGraphRAG engine"]
MEM["Three-layer memory<br/>schema ยท fact ยท passage"]
PPR["PPR retrieval<br/>igraph / neo4j_gds"]
end
subgraph STOR["Pluggable storage"]
PG["Postgres + pgvector"]
NEO["Neo4j + GDS"]
FILE["File defaults<br/>JSON / GraphML / nano-vectordb"]
end
LLM["OpenAI-compatible<br/>LLM + embeddings"]
DOC --> FP
FP --> ENG
QRY --> ENG
GRPH --> ENG
OLL --> ENG
ENG --> STOR
ENG --> LLM
MEM --> PPR
The core engine builds and queries a typed memory graph:
| Layer | Role |
|---|---|
| Schema | Ontology / type structure for entities and relations |
| Fact | Conflict-aware factual triples extracted from content |
| Passage | Chunk-level evidence nodes linked into the graph |
Ingestion runs conflict detection and resolution before installing nodes and edges into the graph.
FastAPI app with routers aligned to LightRAG-style surfaces:
documentsโ upload, status, and pipeline controlqueryโ MemGraphRAG-native retrieval and RAG QAgraphโ graph inspection and operationsollamaโ Ollama-compatible/apiendpoints (prefixes such as/naive,/context,/bypass)
Auth supports JWT (AUTH_ACCOUNTS) and/or API key (MEMGRAPHRAG_API_KEY).
- Parsers:
legacy(local PDF/Office/text) and optional Docling (compose profile / external service) - Chunkers: F (fixed), R (recursive), P (paragraph / semantic) โ selected via env (
CHUNK_*)
Selected by MEMGRAPHRAG_{KV,VECTOR,GRAPH,DOC_STATUS}_STORAGE:
| Concern | Production backends | Defaults (no external DB) |
|---|---|---|
| KV / doc-status / vector | PostgreSQL + pgvector | JSON / nano-vectordb |
| Graph | Neo4j 5 + GDS | igraph GraphML files |
Personalized PageRank over the memory graph:
PPR_ENGINE=igraph(default) โ paper-exact local enginePPR_ENGINE=neo4j_gdsโ Neo4j Graph Data Science alternative
Optional retrieval tracing via Langfuse (LANGFUSE_ENABLE_TRACE, keys, LANGFUSE_BASE_URL / LANGFUSE_HOST). When enabled, each /query emits nested spans for fact linking, PPR, dense fallback, and RAG generation. See docs/LangfuseObservability.md.
OpenAI-compatible bindings only (LLM_*, EMBEDDING_*) โ point at OpenAI, Azure, vLLM, Ollama OpenAI shim, or any compatible gateway. No local torch/HF embedders in the service image for the POC path.
High-level layout of this industrial server repo:
memgraphrag/ # repository root
โโโ memgraphrag/ # Python package
โ โโโ api/ # FastAPI app, auth, config, routers
โ โโโ chunker/ # Chunkers F / R / P
โ โโโ parser/ # Legacy + Docling parsers & registry
โ โโโ storage/ # KV / vector / graph / doc-status backends
โ โโโ ppr/ # igraph & Neo4j GDS Personalized PageRank
โ โโโ llm/ # OpenAI-compatible LLM / embedding bindings
โ โโโ observability/ # Langfuse retrieval tracing (optional)
โ โโโ client/ # HTTP client, CLI (memgraphrag-cli), Streamlit UI
โ โโโ openie/ # OpenIE fact extraction
โ โโโ prompts/ # Prompt templates
โ โโโ sidecar/ # Sidecar writer utilities
โ โโโ utils/ # Hashing, tokenizer, env helpers
โ โโโ core.py # MemGraphRAG engine (index / retrieve / rag_qa)
โ โโโ memory.py # Three-layer memory (schema / fact / passage)
โ โโโ pipeline.py # Async ingestion pipeline
โ โโโ retrieval.py # Retrieval orchestration
โ โโโ base.py # Storage ABCs
โ โโโ rerank.py # Fact / passage reranking
โโโ docs/ # Deployment & API guides
โโโ tests/ # Unit / edge / gated integration tests
โโโ scripts/ # Helper scripts (e.g. test.sh)
โโโ Dockerfile # Service image
โโโ docker-compose.yml # Postgres + Neo4j + app (+ docling profile)
โโโ docker-entrypoint.sh # Container entrypoint
โโโ pyproject.toml # Packaging & extras
โโโ env.example # Environment template
โโโ AGENTS.md # Agent / contributor conventions
โโโ README.md
Guides under docs/, including:
docs/MemGraphRAG-API-Server.mdโ API serverdocs/Clients.mdโ CLI + Streamlit clientsdocs/DockerDeployment.mdโ Compose stackdocs/FileProcessingPipeline.mdโ parsers & chunkersdocs/LangfuseObservability.mdโ Langfuse retrieval tracesdocs/ProgramingWithCore.mdโ engine usage
This repository is maintained by AI agents. Conventions, tech stack, and architecture decisions live in AGENTS.md.
This industrial API server is based on / inspired by the MemGraphRAG research paper. Ownership of this repository remains with EXEIO / ExeioS33.
Paper: arXiv:2606.00610
@article{wu2026memgraphrag,
title={MemGraphRAG: Memory-based Multi-Agent System for Graph Retrieval-Augmented Generation},
author={Wu, Chuanjie and Xiang, Zhishang and Tang, Yunbo and Chen, Zerui and Zhang, Qinggang and Su, Jinsong},
journal={arXiv preprint arXiv:2606.00610},
year={2026}
}MIT โ see LICENSE. Copyright ยฉ 2026 EXEIO / ExeioS33.
