项目的 README,来自 github.com/Ontos-AI/knowhere。合并为一个 markdown 文件:README.md。
🔗 Website | 📄 Docs | 🏠 Self-Host | 🖥️ Dashboard
Knowhere is a document intelligence and retrieval infrastructure that turns complex, dirty files into persistent, navigable memory for AI agents.
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 parses files along their native hierarchy (headings, if any) and uses frontier vision models to cut the extraction errors of traditional parsers. Documents can be ingested progressively: readable and searchable first, enriched in the background. This progressive feature enables fast response in agent systems.
[!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.
ingestion_mode=progressive publishes a readable baseline first, then enriches the rest in the background. MinerU is no longer required by default..gif, .webp, .bmp, .tif/.tiff, and .heic/.heif are now supported.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. Native parsing preserves precise text and structure where they are reliable, and vision parsing 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.
ingestion_mode=progressive, a document becomes readable and searchable first, then gains its outline and hierarchy, and is finally enriched in the background, with bottom-level nodes enriched on demand. Full ingestion, which publishes once parsing completes, is the default.Knowhere runs in two steps: build memory from documents, then let agents retrieve from it.
Knowhere provides the document-memory substrate; the agent decides how to explore it.
use_agentic, a query router chooses classic BM25 or agent retrieval for each query.corpus.* tools for exact search, fuzzy recall, outlines, full reading, table queries, and assets.POST /v2/retrieval/tools/invoke, without running Knowhere's own retrieval agent. Whichever agent explores the memory, Knowhere resolves its references into traceable documents, sections, pages, and linked assets.Q: What is Knowhere's relationship with MinerU?
A: PDF and PowerPoint use vision parsing: Knowhere renders source pages, combines visual interpretation with document profiling and the native hierarchy, 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 parsing also retains rendered page citations, so agents can return both structured context and the visual source evidence.
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.
(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.
| 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. |
ingestion_mode=progressive publish a usable baseline before background enrichment completes.✅ Supported
.pdf .pptx — vision parsing (.pptx also transcribes embedded audio and video).doc .docx .xls .xlsx .csv .tsv.jpg .jpeg .png .gif .webp .bmp .tif .tiff .heic .heif.md .txt .html .htm .json.mp3 .wav .m4a .aac .flac .ogg .opus .mp4 .mov .webm .mkv — speech transcription with speakers, chapters, and time-range citations (video: audio track only)⏳ Coming Soon
.epub .xml.srt .vtt.skills.mdWant to see a new format supported? Adding a parser is a great first contribution. Check out CONTRIBUTING.md to get started.
uvdocker composeuv sync --all-packages
cp apps/api/.env.example apps/api/.env
cp apps/worker/.env.example apps/worker/.env
.env files with the values you need for local work:DS_KEY, ALI_API_KEYS, GPT_API_KEY, or GLM_API_KEYVERCEL_KEY for page-image and query embeddingsALI_API_KEYS (DashScope Fun-ASR) if you want audio and video embedded in presentations transcribedMINERU_API_KEYS only if you turn on the optional MinerU fine-stage page-text extractorMost 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.
./deploy/local-dev/start-dev.sh
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
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.
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
http://localhost:5005http://localhost:5005/docshttp://localhost:4566localhost:5432localhost:6379Self-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_*.
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 = {1.2.51},
license = {Apache-2.0}
}
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:
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