OpenKB — Open LLM Knowledge Base
Scale to long documents • Reasoning-based retrieval • Native multi-modality • No Vector DB
📑 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 for vectorless long document retrieval.
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. 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.
🚀 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. Manage profiles
openkb profiles atlassian
# 4. Import data from Atlassian (Jira and Confluence)
openkb ingest atlassian
openkb ingest atlassian --profile work # Import from a specific profile
openkb ingest atlassian --add # Or import and add data with a single command
openkb ingest atlassian --profile work --add
# 5. Ask a question
openkb query "What are the main findings?"
# 6. Or chat interactively
openkb chat
# 7. Or distill your wiki into a redistributable skill
openkb skill new my-expert "Reason like an expert on <topic-from-your-docs>"
Set up your LLM
OpenKB comes with multi-LLM support (e.g., OpenAI, Claude, Gemini) via LiteLLM (pinned to a safe version).
Set your model during openkb init, or in .openkb/config.yaml, using provider/model LiteLLM format (like anthropic/claude-sonnet-4-6). OpenAI models can omit the prefix (like gpt-5.4).
Create a .env file with your LLM API key:
LLM_API_KEY=your_llm_api_key
🧩 How OpenKB Works
Architecture
raw/ You drop files here
│
├─ Short docs ──→ markitdown ──→ LLM reads full text
│ │
├─ Long PDFs ──→ PageIndex ────→ LLM reads document trees
│ │
│ ▼
│ Wiki Compilation (using LLM)
│ │
▼ ▼
wiki/ │ ← the foundation
├── index.md Knowledge base overview
├── log.md Operations timeline
├── AGENTS.md Wiki schema (LLM instructions)
├── sources/ Full-text conversions
├── summaries/ Per-document summaries
├── concepts/ Cross-document synthesis ← the good stuff
├── entities/ Specific named things (people, orgs, places, products)
├── explorations/ Saved query results
└── reports/ Lint reports
│
┌──────────────────────┼──────────────────────┐
▼ ▼ ▼
query / chat Skill Factory (future)
(LLM answers from openkb skill new ppt / podcast /
the wiki) → output/skills/ report / …
+ marketplace.json
Short vs. Long Document Handling