OpenKB: Open LLM Knowledge Base
Scale to long documents • Reasoning-based retrieval • Native multi-modality • No Vector DB
📢 Recent Updates
- Google Open Knowledge Format (OKF): Wiki pages follow the Google OKF specification for knowledge sharing.
- Entity Pages: People, orgs, places, and products as dedicated wiki pages, auto-extracted and kept in sync.
📑 What is OpenKB
OpenKB (Open Knowledge Base) is an open-source system (in CLI) that compiles raw documents into a structured, interlinked wiki-style knowledge base using LLMs, powered by PageIndex's vectorless, reasoning-based retrieval for long documents.
The idea is based on a concept described by Andrej Karpathy: LLMs generate summaries, concept pages, and cross-references, all maintained automatically. Knowledge compounds over time instead of being re-derived on every query.
Why not traditional RAG?
Traditional RAG rediscovers knowledge from scratch on every query. Nothing accumulates. OpenKB compiles knowledge once into a persistent wiki, then keeps it current. Cross-references already exist, contradictions are flagged, and synthesis reflects everything consumed.
OpenKB has two layers: a wiki foundation that compiles and maintains your knowledge, and generators (query / chat / Skill Factory) that turn it into useful output. See Usage for the full command list.
Features
- Broad format support: PDF, Word, Markdown, PowerPoint, HTML, Excel, CSV, text, URLs, and more.
- Scales to long documents: Long and complex documents are handled via PageIndex tree indexing, enabling accurate, vectorless, context-aware retrieval.
- Native multi-modality: Retrieves and understands figures, tables, and images, not just text.
- Compiled wiki: The LLM compiles your documents into summaries, concept pages, entity pages, and cross-links, all kept in sync.
- Query & chat: One-off questions or multi-turn conversations over your wiki, with persisted sessions to resume.
- Skill Factory: Distills redistributable agent skills from your wiki.
- OKF-ready: Wiki pages follow the Google OKF specification for knowledge sharing.
- Obsidian-compatible: The wiki is plain
.md files with cross-links. Opens in Obsidian for graph view.
- Knowledge Workbench (Web UI): A bundled web UI served at
/ to browse the KB, upload and compile documents, and stream queries and chats — all in the browser.
🚀 Getting Started
Install
pip install openkb
Other install options:
-
Latest from GitHub:
pip install git+https://github.com/VectifyAI/OpenKB.git
-
Install from source (editable, for development):
git clone https://github.com/VectifyAI/OpenKB.git
cd OpenKB
pip install -e .
Quick Start
# 1. Create a directory for your knowledge base
mkdir my-kb && cd my-kb
# 2. Initialize the knowledge base
openkb init
# 3. Add documents
openkb add paper.pdf
openkb add ~/papers/ # Add a whole directory
openkb add https://arxiv.org/pdf/2509.11420 # Or fetch from a URL
# 4. Ask a question
openkb query "What are the main findings?"
# 5. Or chat interactively
openkb chat
# (Optional) Turn the wiki into other outputs
openkb skill new my-expert "Reason like an expert on <your-topic>" # a portable agent skill
openkb visualize # an interactive knowledge graph
openkb deck new my-deck "An intro deck on <your-topic>" # slides — a single-file HTML deck
Set up your LLM
OpenKB supports multiple LLM providers (OpenAI, Claude, Gemini, etc.) via LiteLLM (pinned to a safe version).