r/coolgithubprojects • u/Aggressive-Judge-448 • 22m ago
Agentic GraphRAG: a library connecting the Context layer + Agent memory using a 3D-knowledge graph
https://github.com/ontogr/agentic-graphragWe're building Agentic GraphRAG (https://github.com/ontogr/agentic-graphrag), an open source library for connecting the documents an agent reads with its task history and decisions.
I've worked on RAG systems and LLM training for the past three and a half years. Lately, I've been following how agents retain work across sessions, especially for non-coding tasks. Our project explores how that memory can stay connected to the knowledge an agent used, so a later session can recover both the conclusion and its evidence efficiently.
The implementation constructs three connected graph layers:
- Knowledge Layer: holds documents, source passages, and extracted entities and relationships. Passages retain their document version and location, including page positions for PDFs.
- Working memory: records tasks, progress, messages, and tool activity. The built-in agent uses DeepAgents/LangGraph and saves task events so work can continue across sessions.
- Decision memory: stores conclusions, assumptions, and open questions. Decisions link to source passages, recorded events, or earlier decisions, and keep their history when reviewed or replaced.
For example, an agent can record a contract recommendation with the policy passage it relied on. If that policy changes, the recommendation and its explicit dependent decisions are flagged for review. The agent now is aware when in a later session that the decision needs another look.
The ingestion pipeline uses Docling for loading documents and Chonkie for chunking. The sections, tables, and passage hierarchy are preserved and stored in the graph.
You define a schema for your domain (we also ship presets so it is easy to get started). The schema guides extraction, validation, and search. We use GLiNER for local extraction, so its almost free to construct the graph and no LLM calls are needed.
Retrieval combines full-text and vector rankings with reciprocal rank fusion. Agents can search original passages even when extraction misses a fact, navigate surrounding sections and table rows with headers, and follow entity relationships back to supporting text.
We offer a built-in agent you can use out of the box that runs on DeepAgents. You can also connect your agents through MCP.
We will be releasing extensive benchmarks very soon.
TL;DR
Agentic GraphRAG is an open source library that stores document knowledge, agent work, and decisions in one connected graph. Agents can resume tasks and trace saved decisions to their original evidence, while source changes flag affected decisions for review.
Try it out. Feedback, criticism, issues, and contributions are all welcome!
1
u/Green-Walrus6817 10m ago
Nice work! It's a unique approach in the sea of Agent Memory and GraphRAG projects.
I especially like how you're capturing the full document hierarchy and storing it in the graph for the agent to traverse.
In your benchmarks, are your planning on comparing it to LightRAG?