knowhere README

The project's README from github.com/Ontos-AI/knowhere. As one markdown file: README.md.

Knowhere — Prepare unstructured data for AI agents

Python Version GitHub stars Build Status
Join the community on GitHub Container Images License: Apache 2.0

🔗 Website | 📄 Docs | 🏠 Self-Host | 🖥️ Dashboard

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

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.

Vision and Text tracks converge into a unified navigable memory schema

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

Step 2: Agentic Retrieval

Knowhere provides the document-memory substrate; the agent decides how to explore it.

Any agent can explore Knowhere Memory through one neutral corpus tool contract

FAQ

Q: What is Knowhere's relationship with MinerU?

A: MinerU remains the default raw PDF extractor for Knowhere's V1 chunk-based pipeline. PDF and PowerPoint uploads through the V2 API use Vision Page instead: Knowhere renders the source pages, combines their visual interpretation with document profiling and TOC structure, and assembles page-grounded hierarchy nodes. MinerU is still useful, but V2 no longer treats parser-generated Markdown as the only source of truth.

Q: What LLM / VLM dependencies does Knowhere have?

A: We recommend deepseek-v4-flash-vision-exp 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. The model is currently experimental, and 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.

Benchmark Performance: Agent + Knowhere vs Others

We're not developing the next MinerU — we're building document memory infrastructure that agents can effectively consume.

Key Advantages

(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

Supported Formats

✅ Supported

⏳ Coming Soon

Want to see a new format supported? Adding a parser is a great first contribution. Check out CONTRIBUTING.md to get started.

Prerequisites

Quick Start

  1. Sync the workspace dependencies:
uv sync --all-packages
  1. Copy the environment examples:
cp apps/api/.env.example apps/api/.env
cp apps/worker/.env.example apps/worker/.env
  1. Update the copied .env files with the values you need for local work:

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.

  1. Start the local infrastructure stack:
./deploy/local-dev/start-dev.sh
  1. Start the API and worker in separate terminals:
cd apps/api && uv run main.py
cd apps/worker && uv run worker.py

Run API migrations explicitly before starting the API when the database schema needs updating:

cd apps/api
uv run alembic upgrade heads

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

Additional Guides

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

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:

👋 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

knowhere (Ontos-AI/knowhere)

Searching Database…

这是什么?Knowhere 是一个开源的文档解析与检索系统:它接收杂乱的文件,把它们转化为结构化、可浏览的记忆,供 AI 智能体使用,可随时用于 agentic RAG 和各种 LLM 工作流。
这是托管服务,还是需要我自己部署?两者都有。Knowhere Cloud 是托管 API(knowhereto.ai,注册即送 5 美元免费额度),而本仓库中的开源技术栈——API 加 worker,并带有网页控制台——可以自行部署;此外还提供 Docker Compose 打包以及官方的 Python 和 Node.js SDK。
在本地跑起来这个开源技术栈需要做什么?安装 Python 3.11+、uv 以及带 compose 的 Docker;用 uv 同步工作区依赖,复制 .env 示例文件并填入数据库、Redis、S3 和 LLM 的密钥,然后启动本地基础设施,并在不同的终端里分别运行 API 和 worker。
在能正常工作之前,它需要哪些外部服务和密钥?需要 PostgreSQL、Redis、兼容 S3 的存储,以及至少一个 LLM 密钥:DSKEY、ALIAPIKEYS、GPTAPIKEY 或 GLMAPIKEY。V2 的 PDF/PowerPoint 解析还需要一家支持视觉模型的供应商;MinerU 密钥只有在用旧版 V1 流水线时才需要。
它支持哪些文件格式?还有哪些不支持?PDF 和 .pptx 通过 V2 Jobs API 走 Vision Page 通道;Word、Excel、JPG/PNG 图片、Markdown、纯文本、HTML 和 JSON 走 Text 通道。EPUB、XML、MP4 和 MP3 支持标注为即将推出。
自己部署的话,它会把数据传回厂商吗?会——默认开启向 PostHog 发送匿名产品遥测数据:仅包含安装存活状态和使用量汇总,绝不包含文件名、提示词、邮箱、IP 地址或地理位置。你可以在 apps/api/.env 的 TELEMETRY 设置中关闭它。
Vision 通道和 Text 通道的区别是什么?Text 通道在提取结果可靠时保留精确的文本和原生结构;Vision 通道则让前沿视觉模型把复杂的 PDF 或幻灯片页面当作整页来读取。两者最终都汇入相同的分块和元数据结构,因此检索、层级和引用的行为完全一致。
它的检索和普通 RAG 有什么不同?传统 RAG 只做扁平的向量查找,返回孤立的片段。Knowhere 智能体则会像人类读者那样在文档的章节树和跨文档关系图中导航,返回与章节、页面和关联资源绑定的、可追溯的证据。
它能处理文档里的图片和表格吗?能——图片和表格会被提取出来,经过 VLM 辅助的摘要和特征提取,再链接回它们所在的源章节节点;Vision Page 还会保留渲染后的页面引用,让智能体能够展示可视化的来源。
它到底能把智能体的表现提升多少?在该项目的内部 agentic-RAG 基准测试中,使用 Knowhere 的智能体胜过那些直接读取原始文档或 Markitdown、Unstructured、MinerU 输出的智能体:首次尝试准确率提升 36%,召回率提升 11%,引入反馈后准确率达 79%,而原始文档的上限约为 53%。
What are similar projects?ragflow, m_flow, LightRAG, RAG-Anything, headroom, mem0, lift, opik
Creator
Ontos-AI
Size
866.2 MB
Stars
3.8K
Age
5mo
Commits · 90 Days