$ cd ..

Agent-UniRAG

langgraph
rag
fastapi
python
next.js

Open-source trainable LLM agent framework for unified single-hop and multi-hop question answering. Five-node LangGraph state machine with ChromaDB, FastAPI streaming, and a Next.js UI. Based on arXiv research.

Agent-UniRAG five-node LangGraph workflow for unified single-hop and multi-hop RAG

Agent-UniRAG is an open-source implementation of the paper “Agent-UniRAG: A Trainable Open-Source LLM Agent Framework for Unified Retrieval-Augmented Generation Systems.” It handles both single-hop and multi-hop question answering inside a single unified agent.

Architecture

The agent is a five-node LangGraph state machine:

  • Planning Node — ReAct-style reasoning to decide the next action
  • Document Search — Semantic retrieval over uploaded PDFs via ChromaDB
  • Web Search — Live queries via OpenAI’s web search tool, date-aware
  • Evidence Reflector — Condenses multi-source retrieved content into focused evidence
  • Final Answer — Generates long-form responses with streaming via Server-Sent Events

Stack

  • Backend: FastAPI with SSE streaming
  • Orchestration: LangGraph
  • Vector store: ChromaDB + LangChain
  • Frontend: Next.js / TypeScript with React Flow for execution visualisation
  • Infra: Docker Compose for one-command setup

The framework supports PDF-only mode, web-only mode, and hybrid retrieval — switchable per query.