Categories
AI Agents MCP Server Knowledge Base Self-Hosted AI Knowledge Management Semantic Search Document Q&AStars
Forks
Watchers
Developer links
SAG-Wiki
For anyone whose answers are buried across notes, documents, and code, SAG-Wiki is a knowledge base that indexes local folders without LLM calls, finds the passage you meant, and answers questions with citations that open the original text. Add a folder and Markdown, plain text, Word, PowerPoint, Excel, RTF, EPUB, and text-based PDF files become searchable, with code and configuration types one switch away, and quick keyword search groups hits by file and highlights the matching paragraph in the source. Full-sentence questions go through SAG2 deep search, where a decision model you configure judges which passages count as evidence, and chat answers stream with numbered citations, expandable research steps, tables, and Mermaid diagrams, then save as notes. A built-in editor edits Markdown in place, and a Fold view condenses a long file into brief, key, takeaway, card, and map levels. Notion, GitHub, GitLab, Feishu, Lark, Yuque, RSS, and API feeds can be synced in on a schedule. Coding agents reach the same index through the sag CLI, a Skill for Claude Code, Codex, and OpenCode, and an MCP and HTTP API with keys limited to chosen folders. On Linux the standalone CLI serves a browser app on port 24681 for browsing, editing, uploading, searching, and asking, with an optional access code and HTTPS through your own reverse proxy. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. MIT licensed.
Benefits
- Answers you can trace to sources
- Every answer carries numbered citations, and clicking one opens the original document scrolled to the cited passage, so you can verify each claim against the file instead of trusting a summary.
- Search that needs no model
- Indexing and quick search run locally with no model or API key, so a folder is searchable right after you add it; models are only needed for deep search, summaries, and Q&A.
- One knowledge base for your agents
- Claude Code, Codex, and OpenCode search the same index through the sag CLI or a Skill, and MCP clients connect with API keys limited to selected project folders.
- Run it headless on your own server
- On Ubuntu 24.04 or Debian 12, the standalone CLI serves a web app on port 24681, so any browser on your network can browse, search, edit, upload, and ask questions.
Features
- Fast Local Indexing
- Indexes a million characters of text in roughly 200 ms with no LLM calls; built-in parsers convert Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, and text-based PDF files.
- SAG2 Deep Search
- Full-sentence questions retrieve evidence passages judged by a decision model from Zleap, OpenAI, 302.AI, OpenRouter, or a custom endpoint, with keyword quick search as the model-free fallback.
- Cited Answers and Notes
- Answer models from OpenAI, DeepSeek, GLM, OpenRouter, 302.AI, or a custom endpoint stream cited answers with research steps, tables, formulas, and Mermaid diagrams, and answers save as Markdown notes.
- Agent Skill, CLI, and MCP
- The sag CLI installs a Skill for Claude Code, Codex, and OpenCode, and a Streamable HTTP MCP endpoint plus HTTP API expose search and folders tools with Bearer keys.
- Online Source Sync
- Notion, GitHub, GitLab, Feishu, Lark, Yuque, DingTalk Docs, Tencent ima, RSS or Atom feeds, Apify Actors, and JSON APIs import into the library, scheduled where the connection supports it.
- Browser Web Service
- On Linux, sag api web start serves the library on port 24681, with uploads up to 512 MB per file, an optional access code, and HTTPS via your reverse proxy.