Marker-Inc-Korea/AutoRAG
Your Personal Librarian Agent. Ask anything on your computer, organize files, remember important info and files.
AutoRAG Agent – A Local “Librarian” for Your Files
What it is – AutoRAG Agent is a TypeScript/Node library (published as @autorag/librarian) that turns your computer into a searchable knowledge base. It runs a small LLM‑powered “librarian” locally, reads the contents of the files on your machine (PDF, Word, HWP, images, code, etc.), creates lightweight indexes, and answers natural‑language questions with citations that point back to the original documents.
Why it matters – Traditional Retrieval‑Augmented Generation (RAG) pipelines require you to upload data to a remote vector store, manage embeddings, and keep a separate search service. AutoRAG skips all that: it federates the data in‑place, builds BM25 and vector indexes on‑the‑fly, and keeps everything private on your device. The result is a fast, zero‑telemetry, “just works” RAG experience that can be used from a desktop UI, a terminal UI, a CLI script, or embedded in your own TypeScript code.
Key features
- Desktop app (Electron + React) – browse folders, ask questions, see answers with numbered citations, and preview many file types (PDF, Office, HWP, images, video, audio).
- Multi‑source retrieval – Slack, Discord, Telegram, WhatsApp, Gmail, GitHub, Obsidian, plus any local folder.
- Hybrid search – combines fast BM25 lexical ranking, dense vector retrieval (using the bundled
qwen3‑embedding‑0.6bmodel), and a reranker (OpenRouter’svoyageai/rerank‑3‑liteby default). - Local embedding model – runs the
qwen3‑embedding‑0.6bmodel on‑device; no external API keys are needed for basic indexing. - Privacy‑by‑design – all document parsing and embedding happen locally; API keys are stored in the OS‑encrypted credential store.
- Pluggable “datasource skills” – each external service is accessed through a small plugin that returns searchable chunks, so the same librarian can answer questions that span files and chat histories.
- Incremental CDC indexing – the built‑in MinSync component watches your folders and updates BM25/vector chunks continuously, even when the app is closed.
- File‑name search – on Windows it bundles the portable Everything engine; on macOS/Linux it can use
fsearch-clifor sub‑second name look‑ups. - CLI & TUI –
autoragprovides commands to initialise, index, check health, and run searches (autorag search …). The interactive TUI (autorag tui) lets you steer a search in real time, correct it, or stop it. - Programmatic API – import
@autorag/librarianin any Node/TS project and call the same search functions from code.
How it works
- Initialisation –
autorag initcreates a config that points to one or more “search paths” and selects languages for OCR/parsing. - Parsing & indexing – Documents are parsed with the
kordoclibrary (no Java needed). Optional OCR uses a built‑in PP‑OCRv5 model for Korean/English or Tesseract for other languages. Parsed text is chunked, BM25 terms are stored, and dense vectors are generated via the local embedding model. - Retrieval – When you ask a question, the agent runs a two‑phase process: (a) fast lexical/semantic retrieval across all enabled methods, (b) a verification step where the agent opens the top‑ranked files with
cat,grep, etc., to confirm the evidence. - Curation – The LLM produces a plain answer; the framework replaces inline citation markers (
[eN]) with numbered references that include file paths, page numbers, or line ranges. The cited evidence is stored in~/.autorag/memory.jsonfor future queries. - Agent host – AutoRAG runs on top of the Pi agent framework, which handles model credentials, session persistence, and the interactive terminal UI. AutoRAG contributes only the retrieval and curation logic.
Installation
# Global CLI install (Node ≥24 or Bun ≥1.2)
bun install -g @autorag/librarian # or npm install -g @autorag/librarian
The package pulls in the required binaries (Everything on Windows, MinSync, etc.) on first run.
Typical workflow
# 1️⃣ Set up the folders you want searchable
autorag init --search-paths ~/Documents/research
# 2️⃣ Build the indexes (parses PDFs, markdown, Office files, etc.)
autorag refresh
# 3️⃣ Ask a question from the CLI or TUI
autorag search "What were the key changes in the Q3 cloud contract?"
# or
autorag tui # then type your query interactively
The answer will be returned with citations like:
[1] Enterprise Compute Discount — AWS annual discount tier increased to 28% (contracts/cloud-2026.pdf:p.4)
[2] Regional Data Residency — compliance clause pinning data to Seoul (slack/legal-ops#318)
Who might use it – knowledge workers who need a personal “search‑engine‑for‑everything” on their laptop, developers building AI‑augmented tools that need local document understanding, or teams that want a privacy‑preserving RAG layer without managing a vector database.
Links
- Library:
@autorag/librarian(npm) - Desktop UI repo: NomaDamas/AutoRAG‑app
- Legacy Python AutoRAG (still maintained) lives in the
legacy/folder.
Related
- Project
- Project
- Project
- Project
- Project