Overview
Knowhere is a document parsing and retrieval system for agent workloads. Its premise is that conventional OCR and document-intelligence pipelines make perfect element-by-element extraction a prerequisite for retrieval — and on dirty PDFs and slide decks, errors in reading order, layout, tables or hidden text layers accumulate into unreliable context. Knowhere instead parses along two tracks: a Text Track that preserves native structure where it is reliable, and a Vision Track where frontier vision models understand a PDF page or a PowerPoint slide as a whole.
Both tracks converge on the same chunk and metadata schema, so everything downstream — storage, hierarchy, graph construction, retrieval — is format-independent. What a run produces is not a pile of chunks but navigable memory: section nodes that keep document paths, page ranges, summaries, entities and linked assets, plus a cross-document graph built from page-derived typed entities and keywords. Images and tables are extracted, summarised with a VLM and linked back to the section they came from, and results retain the source document, section path, page number and rendered visual evidence for citation.
Retrieval is deliberately agent-neutral. Knowhere exposes one corpus schema and a set of hierarchy-aware tools — document outlines, structural filters, exact search, fuzzy recall, full reading, assets and cross-document relationships — and lets the agent decide which to call and how deep to traverse, rather than forcing every query through a fixed pipeline. The same contract is available to built-in agents and to external ones over MCP, and classic top-K retrieval remains available when a deterministic lookup is what you want. The project is model-agnostic, with the API, worker, dashboard, Docker stack and Python/Node SDKs all published under Apache-2.0.
What it does
- Dual-track parsing — a Text Track for reliable native structure, a Vision Track for complex PDFs and .pptx understood page-by-page by a vision model
- One hierarchy-native memory schema shared by both tracks: section paths, page ranges, summaries, entities, linked assets
- Cross-document memory graph built from page-derived typed entities and keywords across a namespace
- Agent-native retrieval: outlines, structural filters, exact search, fuzzy recall, full reading and relationship tools, callable over MCP
- Page-grounded citations that resolve back to documents, sections, page numbers and rendered visual evidence
- VLM-assisted image and table handling, linked back to their source section nodes
- Model-agnostic across OpenAI, Qwen, GLM, DeepSeek, Volcengine and other compatible providers
- Self-hostable stack (API, worker, dashboard, Docker Compose) plus official Python and Node SDKs for the hosted API
Getting started
Running the backend locally needs Python 3.11+, uv, and Docker with docker compose. Supported inputs are .pdf and .pptx (Vision Page via the V2 Jobs API), .doc/.docx/.xls/.xlsx, images, and .md/.txt/.html/.json.
Install dependencies
Clone the repository and sync the workspace.
uv sync --all-packagesConfigure the services
Copy the environment examples and fill in database and Redis settings, S3-compatible storage credentials, and at least one LLM provider key (DS_KEY, ALI_API_KEYS, GPT_API_KEY or GLM_API_KEY). V2 PDF and PowerPoint parsing additionally needs a vision-capable provider.
cp apps/api/.env.example apps/api/.env
cp apps/worker/.env.example apps/worker/.envStart infrastructure, API and worker
Bring up the local stack, then run the API and the worker in separate terminals. Run migrations explicitly when the schema needs updating.
./deploy/local-dev/start-dev.sh
cd apps/api && uv run main.py
cd apps/worker && uv run worker.py
# when the schema changed
cd apps/api && uv run alembic upgrade headsCreate a user and ingest
For API-only work (no dashboard), create a user and key once the API is up; otherwise register through the dashboard. Then upload documents through the Jobs API and point your agent at the resulting corpus over MCP.
cd apps/api
uv run scripts/init_user.py --email you@example.comCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Reach for it when your corpus is PDFs and slide decks that ordinary parsers mangle — scans, atlases, drawing collections, dense layouts
- Reach for it when answers must be citable back to a page, not just to a chunk
- Reach for it to give an agent a document graph it can navigate like a reader instead of a flat vector lookup
- Reach for it when several agents or frameworks need to share one corpus contract over MCP
How Knowhere compares
Knowhere alongside other open-source parsing & ingestion tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| MarkItDown | ★ 186k | A Microsoft Python utility that converts many file types, including Office docs and PDFs, into Markdown for LLMs. |
| MinerU | ★ 80.4k | A document extraction tool that converts PDFs and Office files into clean Markdown or JSON, with strong handling of complex layouts and CJK content. |
| Docling | ★ 67.5k | An IBM-originated document conversion pipeline that turns PDF, DOCX, PPTX, HTML, and more into structured, LLM-ready Markdown or JSON. |
| Marker | ★ 39.9k | A fast pipeline that converts PDFs and other documents to Markdown, JSON, or HTML while preserving tables, equations, and formatting. |
| OpenDataLoader PDF | ★ 29.3k | OpenDataLoader PDF turns any PDF into structured Markdown, JSON, or HTML with bounding boxes, and auto-tags untagged files into screen-reader-ready Tagged PDFs. |
| Repomix | ★ 28.4k | Repomix packs an entire repository into one file that is easy to feed to AI tools like Claude, ChatGPT, and Gemini. |
| Unstructured | ★ 15.5k | A library for ingesting and preprocessing many document types into clean, chunked elements ready for RAG pipelines. |
| Knowhere | ★ 3.4k | Turn messy documents into hierarchy-native memory agents can navigate and cite |