#3333rd of 94 in RAG, knowledge and search
sag
Self-hosted knowledge base with event-entity retrieval and cited agent answers
- Stars
- 3k
- License
- MIT
- Last commit
- Nov 2026
- Last release
- Sep 2026
- Language
- Python
1,131 on 27 Apr 20263,019 on 23 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
SAG ingests documents (Markdown, text, PDF, Office, web), chunks and embeds them, and extracts one event and several entities per chunk into SQLite and LanceDB. Retrieval expands from seed events through SQL joins on shared entities, then returns the original chunks for search, graph views and cited chat. It exposes REST/OpenAPI, an OpenAI-compatible endpoint, MCP and a Python package.
Who it is for: Individuals and agent builders wanting a private, cited document knowledge base
Strengths
- Starts on SQLite and LanceDB; no external database needed
- Every result and citation opens the original source chunk
- Exposes REST/OpenAPI, OpenAI-compatible chat, MCP, and a CLI for Codex and Claude Code
- Desktop installers for macOS (Apple Silicon) and Windows bundle backend and UI
Weaknesses
- Single-user by design; no multi-user support
- Indexing needs an embedding model and an LLM endpoint for event extraction
- Benchmark claims come from the authors' own paper and repo
- Changing the embedding model requires deleting and re-importing documents
What it needs
- no GPU
- Compose
- Needs LLM and embedding API (302.AI, DeepSeek, Zhipu, Alibaba Bailian, or OpenAI-compatible), MinerU (optional, for PDF parsing)
- Models: OpenAI-compatible, OpenAI Responses API, Azure, Bedrock, DeepSeek
- port 3000
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe.
Known problems
Reported, then fixed by a linked change
- Windows installer fails to start due to default port 8000 conflict — allow port configuration during setupdefault ↗ (opens in a new tab)0 reactions · closed 22 Oct 2026Fixed by fix(desktop): 自动处理本机 API 端口冲突 ↗ (opens in a new tab)
- Extraction batch fails when response mixes valid and out-of-range references ↗ (opens in a new tab)0 reactions · closed 20 Sept 2026Fixed by feat(config): 升级 zleap-sag 至 0.13.0 并修复 OCTX 向量复用 ↗ (opens in a new tab)
- web image build fails when Google Fonts is unreachable (next/font/google hard dependency) ↗ (opens in a new tab)0 reactions · closed 5 Sept 2026Fixed by fix(web): self-host fonts to remove build-time Google Fonts dependency ↗ (opens in a new tab)
Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.
Also in RAG, knowledge and search
See all 94| Rank | Project | Score |
|---|---|---|
| #31 | opendeepwikiGenerates wiki-style docs and chat for Git repos, with per-repo MCP endpoints | 71 out of 100 |
| #32 | paperless-gptLLM-based OCR, titles, tags and document linking for paperless-ngx | 70 out of 100 |
| #34 | audiomuse-aiSelf-hosted sonic analysis and playlist generation for Navidrome, Jellyfin and Plex | 69 out of 100 |
| #35 | llm-wiki-compilerCLI that compiles source documents into a cited, interlinked markdown wiki | 69 out of 100 |
| #36 | naoChat agent that answers warehouse questions from a data-team-maintained context layer | 69 out of 100 |