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 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.

📢 News

Document Parsing: By Format, Progressively

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.

Documents are routed by format, published progressively, and converge into one navigable 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.

A query router chooses classic or agent retrieval, and any external agent can call the same corpus tools directly

FAQ

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.

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.

  1. Start the local infrastructure stack:
./deploy/local-dev/start-dev.sh
  1. 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
  1. 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

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      = {1.2.51},
  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…

What is this?Knowhere is an open-source document parsing and retrieval system: it ingests messy files and turns them into structured, navigable memory for AI agents, ready for agentic RAG and any LLM workflow.
Is this a hosted service, or do I run it myself?Both. Knowhere Cloud is a managed API (knowhereto.ai, $5 in free credits on signup), while the open-source stack in this repo — API plus worker, with a web dashboard — can be self-hosted; a Docker Compose bundle and official Python and Node.js SDKs are also available.
What does it take to get the open-source stack running locally?Install Python 3.11+, uv, and Docker with compose; sync workspace dependencies with uv, copy the .env examples and fill in database, Redis, S3, and LLM keys, then start the local infrastructure stack and run the API and worker in separate terminals.
Which outside services and keys does it need before it works?PostgreSQL, Redis, S3-compatible storage, and at least one LLM key: DSKEY, ALIAPIKEYS, GPTAPIKEY, or GLMAPIKEY. V2 PDF/PowerPoint parsing additionally needs a vision-capable model provider; a MinerU key is only required for the legacy V1 pipeline.
Which file formats does it accept, and are any still missing?PDF and .pptx go through the Vision Page track via the V2 Jobs API; Word, Excel, JPG/PNG images, Markdown, text, HTML, and JSON run on the Text track. EPUB, XML, MP4, and MP3 support is marked as coming soon.
Does self-hosting it send anything back to the vendor?Yes — anonymous product telemetry to PostHog, on by default: install liveness and usage aggregates only, never filenames, prompts, emails, IPs, or geo. You can opt out via the TELEMETRY settings in apps/api/.env.
What is the Vision vs Text track split about?The Text Track keeps precise text and native structure where extraction is reliable; the Vision Track lets frontier vision models read complex PDF or slide pages as whole pages. Both converge into the same chunk and metadata schema, so retrieval, hierarchy, and citations work identically.
How is its retrieval different from plain RAG?Traditional RAG does a flat vector lookup and returns isolated snippets. Knowhere agents instead navigate the document's section tree and cross-document graph the way a human reader would, returning traceable evidence tied to sections, pages, and linked assets.
Does it cope with images and tables inside documents?Yes — images and tables are extracted, run through VLM-assisted summarization and feature extraction, and linked back to their source section nodes; Vision Page also retains rendered page citations so agents can show the visual source.
How much does it actually improve agent performance?In the project's internal agentic-RAG benchmarks, agents using Knowhere beat those fed raw documents or Markitdown, Unstructured, or MinerU output: +36% first-try accuracy, +11% recall, and 79% accuracy with feedback versus a ~53% ceiling on raw docs.
Creator
Ontos-AI
Size
870.4 MB
Stars
4.1K
Age
7mo
Commits · 90 Days