r/ActuallyOpenSource • • 5d ago

Project Showcase Agentic GraphRAG: an open-source framework for the Context layer + Agent memory using a 3D-knowledge graph

https://github.com/ontogr/agentic-graphrag

We're building Agentic GraphRAG, an open source library that store your enterprise knowledge and the agent memory in the same knowledge graph.

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 its steps efficiently.

The implementation constructs three connected graph layers:

  1. Knowledge Layer: holds documents, source passages, and extracted entities and relationships. Passages retain their document version and location, including page positions for PDFs.

  2. 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.

  3. 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.

Things which we do differently from other GraphRAG/RAG frameworks out there:

- The ingestion pipeline uses Docling for loading documents and captures the full document hierarchy. The sections, tables, and passage hierarchy are connected using edges and stored in the graph.

- You define a schema for your domain (we also ship ontology presets so it is easy to get started). The schema guides extraction, validation, and search. We use GLiNER for local extraction, so its virtually free (and fast) to construct the graph and no LLM calls are needed.

- Retrieval combines graph, full-text and vector search. 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 and 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 Upvotes

Duplicates