SAG

A new SOTA for RAG — an original retrieval architecture and an open-source knowledge base for humans and agents.

What is SAG?

A new SOTA for RAG — an original retrieval architecture and an open-source knowledge base for humans and agents.

Overview of SAG

What it is

SAG is an open-source knowledge base application built on an original retrieval architecture. It is designed for both human users and AI agents. The system ingests documents and data, transforms them into structured knowledge, and provides search, source tracing, and cited agent answers. It is local-first and single-user, starting with SQLite and LanceDB without requiring an external database.

Key features

  • Knowledge ingestion: supports file and web sources, document parsing, chunking, embedding, and event/entity extraction with background processing.
  • Search: offers cross-source or source-scoped retrieval with Fast (vector/multi_es_fast), Precise (multi), and optional JEV reranking (multi_jev) modes.
  • Source tracing: opens any result or citation back to the exact original chunk.
  • Knowledge graph: allows inspection of events, entities, and their queryable associations.
  • Agent chat: provides multi-turn answers grounded in selected sources with clickable citations.
  • Integration: includes self-hosted REST/OpenAPI, OpenAI-compatible chat, MCP, and the zleap-sag Python package.

Use cases

Individuals can use SAG as a personal knowledge base to organize scattered documents and data into searchable, connected, and traceable knowledge. Developers and AI agents can integrate SAG via its API or MCP to retrieve cited answers from ingested knowledge. Researchers can reproduce the benchmark results reported in the SAG paper.

Getting started

bashgit clone https://github.com/Zleap-AI/SAG.gitcd SAGdocker compose up -d --buildNo API key, Python runtime, Node runtime, or external database is required to boot the application. Open http://localhost:3000 for the web application and http://localhost:8000/docs for API documentation.

License and pricing

The project is licensed under MIT and is open source. Pricing is not stated beyond the open source license.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/zleap-aisag.svg)](https://yunodb.com/tools/zleap-aisag?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/zleap-aisag?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/zleap-aisag.svg" alt="Featured on YunoDB" height="20"></a>