需先手动填写 .env 中的数据库、Redis、S3 凭据和至少一个 LLM 供应商密钥,否则服务起不来;V2 的 PDF/PPT 解析依赖视觉模型供应商,只配文本模型不够;数据库迁移需用 MIGRATION_DATABASE_URL 指定 root 角色执行,API 默认跑在 5005 端口;自托管默认开启匿名遥测,需设 TELEMETRY_ENABLED=false 关闭
knowhere
Ontos-AIApache-2.0活跃维护把各类文档抽取、解析成结构化分块,直接喂给 AI Agent 和 RAG 流水线,省去自己写清洗和切分逻辑。
Knowhere extracts, parses, and outputs structured chunks ready for AI Agents and RAG.
uv sync --all-packages
cp apps/api/.env.example apps/api/.env
./deploy/local-dev/start-dev.shREADME 未说明显存或 GPU 要求;需自备 PostgreSQL、Redis、S3 兼容存储,以及至少一个 LLM 供应商密钥和视觉模型供应商
把杂乱文档解析成带层级和引用的结构化记忆,供 AI Agent 与 RAG 直接检索
把各类文档抽取、解析成结构化分块,直接喂给 AI Agent 和 RAG 流水线,省去自己写清洗和切分逻辑。
核心能力
- 双轨解析:文本轨保留原生结构,视觉轨整页理解复杂 PDF 与 PPT
- 两条轨输出统一的层级化 chunk 与元数据 schema
- 构建导航树、关联资产、引用与跨文档关系作为 Agent 上下文
- 通过 MCP 向外部 Agent 暴露层级感知的检索工具
- 支持数百页超长 PDF 与图集类文档的专用版面解析
容易踩的坑
- v1.2.49最新正式版2026-11-09 · 2026-11-09 10:52 UTC
Changes
- Recover text during progressive PDF ingestion by running OCR on pages whose native text is detected as corrupt. Recovered text is available to search and later enrichment. See #523.
- The initial parse uses a bounded OCR budget. Pages that exceed the budget retain their page image and may lack searchable text. Existing parse snapshots require reprocessing to pick up the change.
- v1.2.482026-11-09 · 2026-11-09 08:08 UTC
查看更新说明
Changes
- Return HTTP 503 for failed Cursor Deep Search runs and log safe provider diagnostics. Cursor usage exhaustion has a specific client message. See #525.
- Use Cursor SDK 1.0.39 for terminal failure details and expire legacy Cursor retrieval cache entries. See #525.
- Scope retrieval candidate deduplication by document. See #506.
- v1.2.472026-11-09 · 2026-11-09 04:49 UTC
查看更新说明
TSV files are now accepted for ingest. CSV and TSV are billed as spreadsheets from visible non-empty cells, and XLSX page estimates use the same cell count. Gemini Embedding 2 text and image token prices are recorded for usage.
Reviewed in PR #519. Complete PR CI passed (lint, typecheck, API/worker tests, CodeQL and secret scanning). No migrations or new environment variables. Production and staging
SUPPORTED_EXTENSIONSmust include.tsvto accept TSV uploads. - v1.2.462026-11-09 · 2026-11-09 02:14 UTC
查看更新说明
Host agents and Hipo can now call corpus.recall, corpus.grep, corpus.outline, corpus.read, corpus.query_table, and corpus.assets through POST /api/v2/retrieval/tools/invoke, without running Knowhere's own retrieval agent. Guest API keys are allowed on this route, matching /v2/retrieval/query. Tools outside that whitelist return 400.
Reviewed in PR #513. Complete PR CI passed (lint, typecheck, API/worker tests, CodeQL and secret scanning). No migrations or new environment variables.
- v1.2.452026-11-06 · 2026-11-06 06:35 UTC
查看更新说明
Short scanned PDFs without a TOC now render page images on V2 full ingest, instead of an empty whole-document chunk. Short text PDFs without a TOC still return their original page text.
Reviewed in PR #502. Complete PR CI passed (lint, typecheck, worker/API tests, CodeQL and secret scanning). Existing snapshots stay as-is; new full ingest after this API ships writes page citation images.
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Overview
Knowhere is a document parsing and retrieval system that turns complex, dirty files into persistent, navigable memory for AI agents—especially across local and offline document collections.
It ingests unstructured documents and produces persistent, navigable memory: parsing, hierarchy reconstruction, multi-modal structuring, and graph construction in a single pipeline. Every result stays connected to its document, section, source pages, and related assets, making the output a natural fit for Agentic RAG, vector-based RAG, or any LLM workflow.
Knowhere 2.0 supports complementary Vision and Text tracks. Text-native documents retain precise extracted structure, while complex PDFs and PowerPoint files can be understood directly as pages by frontier vision models. Both tracks converge into the same memory schema, hierarchy, retrieval engine, and citation model.
[!NOTE] Get started in seconds with Knowhere Cloud. Avoid the complexity of self-deployment. Use our managed API at knowhereto.ai and enjoy $5 in free credits upon registration.
📢 News
- September 8, 2026: 🧭 Introducing agent-native Retrieval 2.0. MapNav has evolved from a fixed navigation workflow into a corpus-native foundation for agents. Knowhere provides a unified schema, hierarchy-aware tools, and resolvable evidence references; the agent decides how to search, traverse, read, and cite. The same foundation powers built-in retrieval and external agents through MCP.
- September 2026: 👁️ Introducing dual-track Document Parsing 2.0. Vision Page and Text Track now converge into one hierarchy-native memory schema for retrieval, understanding, and citation.
- June 1, 2026: 📚 Knowhere now supports ultra-long PDFs and atlas-style documents. The parsing pipeline can process long-form PDFs with hundreds of pages (for example, 300, 500, or more) and route technical atlases or drawing collections through a dedicated layout-aware parser.
- May 7, 2026: 🚀 Knowhere is now Open Source! We have open-sourced our entire stack for document ingestion, parsing, and agentic RAG. You can now self-host the full platform using knowhere-self-hosted. Check out our Contribution Guide to get involved!
Vision + Text: Document Parsing 2.0
Traditional OCR and Document Intelligence pipelines try to extract every element before a model can understand the document. On dirty PDFs and slide decks, mistakes in reading order, layout, tables, or hidden text layers can accumulate into unreliable model context.
Knowhere does not make perfect element-by-element extraction a prerequisite for retrieval. The Text Track preserves precise text and native structure where they are reliable. The Vision Track uses frontier vision models to understand a page or slide as a whole, so visually complex content can still be recalled and understood without first reconstructing every element.
- Two tracks, one contract: Both parsing paths produce the same chunk and metadata schema, so downstream storage, hierarchy, graph construction, and retrieval remain format-independent.
- Recall without brittle reconstruction: Pages can be indexed through summaries, entities, source text, and hierarchy even when OCR or layout extraction cannot reliably recover every component.
- One navigable memory: Text sections and vision-understood pages become compatible hierarchy nodes with source evidence, linked assets, and cross-document relationships.
PDF and .pptx uploads through the V2 Jobs API use the Vision Track; other supported formats use the Text Track. The tracks differ in how they understand the source, not in how agents consume the resulting memory.
How it Works
Knowhere runs in two steps: build memory from documents, then let agents retrieve from it.
Step 1: Parse and Build Memory
- Route: Select the Vision or Text track according to the document format and API generation.
- Understand: Preserve native text structure where it is reliable, or understand complex pages holistically with a vision model.
- Normalize: Convert both tracks into the same hierarchy-native chunk and metadata schema.
- Build Memory: Store navigation trees, linked assets, citations, and cross-document relationships as agent-ready context.
Step 2: Agentic Retrieval
Knowhere provides the document-memory substrate; the agent decides how to explore it.
- Provide the substrate: Knowhere exposes one corpus schema and tools for document outlines, structural filters, exact search, fuzzy recall, full reading, assets, and cross-document relationships.
- Let the agent explore: Instead of forcing every query through a fixed navigation pipeline, the agent chooses which tools to call, in what order, and how deeply to traverse.
- Stay agent-neutral: The same corpus and evidence contract works across built-in agents, MCP clients, models, and orchestration frameworks. Whichever agent explores the memory, Knowhere resolves its references into traceable documents, sections, pages, and linked assets.
FAQ
Q: What is Knowhere's relationship with MinerU?
A: PDF and PowerPoint use the page-memory pipeline: Knowhere renders source pages, combines visual interpretation with document profiling and TOC structure, and assembles page-grounded hierarchy nodes. MinerU is an optional fine-stage page-text extractor and is off by default. Knowhere does not treat parser-generated Markdown as the source of truth.
Q: What LLM / VLM dependencies does Knowhere have?
A: We recommend deepseek-flash as a unified model for both Text and Vision workloads. It accepts text and image input, so the same model can handle summarization, hierarchy reasoning, page understanding, and asset descriptions. Knowhere remains model-agnostic: you can use another model—or separate Text and Vision models—from OpenAI, Qwen, GLM, Volcengine, or any compatible provider.
Q: How is Agentic Retrieval different from traditional RAG?
A: Traditional RAG does a flat vector lookup and returns isolated snippets. Knowhere's agents navigate the document's section tree and cross-document graph, drilling into the most relevant regions the way a human reader would, returning traceable, well-contextualized evidence.
Q: Does it handle images and tables?
A: Yes. Knowhere extracts images and tables, runs them through VLM-assisted summarization and feature extraction, and links them back to their source section nodes. Vision Page also retains rendered page citations, so agents can return both structured context and the visual source evidence.
Performance Benchmark
Agents using Knowhere outperform those working from raw documents, Markitdown, Unstructured, or MinerU output on real-world tasks: searching, modifying, and answering questions.
We're not developing the next MinerU — we're building document memory infrastructure that agents can effectively consume.
Key Advantages
- Accuracy: +36% first-try accuracy and +11% recall over raw documents.
- Reliability: 79% accuracy with feedback, vs. a ~53% ceiling on raw docs.
- Efficiency: Fewer loops, fewer tokens, less time. Agents navigate a structured graph instead of reading monolithic text.
(Internal evaluation across identical agentic RAG tasks. Baselines: raw documents and parser output fed directly to agents.)
[!NOTE] 📊 Benchmarks are actively expanding. More parsers and retrieval baselines coming soon.
Ecosystem
| Repository | Description |
|---|---|
| knowhere | This repo. Backend API and worker: document ingestion, parsing, graph construction, and retrieval. |
| 🖥️ knowhere-dashboard | The web UI. Connects to the API for the full product experience. |
| 🐳 knowhere-self-hosted | Docker Compose stack for self-hosted deployments. Packages the API, worker, and dashboard together. |
| 🐍 knowhere-python-sdk | Official Python SDK for the Knowhere Cloud API. |
| 🦕 knowhere-node-sdk | Official Node.js SDK for the Knowhere Cloud API. |
Features
- Dual-track Parsing: Vision and Text tracks handle different document conditions while producing the same downstream schema.
- Vision Page Understanding: Frontier vision models make complex PDF and PowerPoint content recallable without requiring perfect element-by-element OCR or layout reconstruction.
- Hierarchy-native Memory: Section nodes preserve document paths, page ranges, summaries, entities, and linked assets instead of returning disconnected chunks.
- Cross-document Memory Graph: Page-derived typed entities and keywords connect related documents across a namespace.
- Agent-native Retrieval: Built-in and MCP-connected agents explore the same corpus schema and hierarchy-aware tools; classic retrieval remains available for deterministic top-K search.
- Page-grounded Citations: Results retain source documents, section paths, page numbers, and rendered visual evidence.
Supported Formats
✅ Supported
-
.pdf.pptx— Vision Page through the V2 Jobs API -
.doc.docx.xls.xlsx -
.jpg.jpeg.png -
.md.txt.html.htm.json
⏳ Coming Soon
-
.epub.xml -
.mp4.mp3 -
.skills.md
Want to see a new format supported? Adding a parser is a great first contribution. Check out CONTRIBUTING.md to get started.
Prerequisites
- Python 3.11+
uv- Docker with
docker compose
Quick Start
- Sync the workspace dependencies:
uv sync --all-packages
- Copy the environment examples:
cp apps/api/.env.example apps/api/.env
cp apps/worker/.env.example apps/worker/.env
- Update the copied
.envfiles with the values you need for local work:
- database and Redis connection settings
- S3-compatible storage credentials
- at least one LLM provider key:
DS_KEY,ALI_API_KEYS,GPT_API_KEY, orGLM_API_KEY - a vision-capable model provider for V2 PDF/PowerPoint parsing, page understanding, image summaries, OCR, atlas classification, or image-aware retrieval
MINERU_API_KEYSonly if you turn on the optional MinerU fine-stage page-text extractor- any optional billing or webhook providers you want to enable
Most parser and retrieval tuning values have code defaults. Start with the required external services first, then override model names, provider URLs, budgets, or concurrency limits only when your deployment needs different behavior. See docs/external-services.md for the full dependency matrix.
- Start the local infrastructure stack:
./deploy/local-dev/start-dev.sh
- Run migrations with the local management role. The infrastructure script
provisions
knowhere_runtime; the API/Worker environment examples use that non-superuser role so shared demo row-level security is enforced.
cd apps/api
MIGRATION_DATABASE_URL=postgresql+asyncpg://root:root123@localhost:5432/Knowhere \
uv run alembic upgrade heads
- Start the API and worker in separate terminals:
cd apps/api && uv run main.py
cd apps/worker && uv run worker.py
For API-only development without the dashboard, create an API-only user/key after the API service starts:
cd apps/api
uv run scripts/init_user.py --email [email protected]
If you plan to use the dashboard, register through the dashboard instead of
using scripts/init_user.py.
The API is now running at http://localhost:5005. If you want the full product experience with a UI, run the knowhere-dashboard alongside it; it connects to this API out of the box.
Quality Checks
Run lint checks from the repository root:
make lint
Apply safe Ruff fixes:
make lint-fix
Run type checks across the API, worker, and shared source code:
make typecheck
Run both lint and type checks:
make check
Local Endpoints
- API:
http://localhost:5005 - OpenAPI docs:
http://localhost:5005/docs - LocalStack:
http://localhost:4566 - PostgreSQL:
localhost:5432 - Redis:
localhost:6379
Additional Guides
- Retrieval document scope: docs/retrieval-document-scope.md
- External dependency guide: docs/external-services.md
- Architecture decisions: docs/adr/README.md
Telemetry
Self-hosted Knowhere emits anonymous product telemetry to PostHog so Ontos operators can understand OSS adoption (install liveness, usage aggregates, client/document mix). Events never include filenames, prompts, emails, IPs, or geo. Schema and allowlists are locked in ADR-0004.
Telemetry is default-on. To opt out, set:
TELEMETRY_ENABLED=false
Related settings live in apps/api/.env.example under TELEMETRY_*.
Citation
If you use Knowhere in your research, please cite it as:
@software{knowhere2026,
author = {Ontos AI},
title = {Knowhere: Prepare Unstructured Data for AI Agents},
year = {2026},
publisher = {GitHub},
url = {https://github.com/Ontos-AI/knowhere},
version = {2026.04.30.1},
license = {Apache-2.0}
}
Communication
- GitHub Discussions for questions, ideas, and general conversation.
- GitHub Issues for bug reports and feature requests.
Contribution
Any contributions to Knowhere are more than welcome!
If you are new to the project, check out the good first issues. They are well-defined, relatively simple, and a great way to get familiar with the codebase and the contribution workflow.
For general guidelines on branching, commit conventions, and the review process, take a look at CONTRIBUTING.md.
Other useful references:
- SECURITY.md: how to report vulnerabilities responsibly.
- CODE_OF_CONDUCT.md: community behavior expectations.
- LICENSE and NOTICE: Apache 2.0.
👋 We're Hiring!
We're building the knowledge layer for the Agent era. If that sounds like work you want to do, reach out. Decode the address below and drop us a line:
echo 'dGVhbUBrbm93aGVyZXRvLmFp' | base64 --decode