Khoj: Open Source AI Repository & Self-Hosting Guide
Open-source personal AI assistant and self-hosted workspace indexing Markdown, Org-mode, Notion, and PDFs for hybrid local or cloud RAG chat.
Khoj: Architecture & Practical Workflow
Khoj runs as a self-hosted Docker/Python server with native browser, Obsidian, Emacs, and WhatsApp clients—combining local semantic embeddings, scheduled recurring web research automations, and support for Ollama, OpenAI, Anthropic, and Gemini.
Point Khoj at your Obsidian Markdown vault and reference PDFs via Docker, then schedule automated morning summaries using your preferred local or cloud model.
Quick Setup & Installation Steps
Platform target: Self-Hosted / App (GitHub). Always verify environment variables and dependencies in the upstream repository README.
- 1Clone the repository from GitHub: `git clone https://github.com/khoj-ai/khoj.git && cd khoj`.
- 2Review the AGPL-3.0 license (Check the repo's license. Model weights may have a different license.) and note any separate terms on external model weights.
- 3Install or launch the project directly: `pip install khoj-assistant && khoj` (use an isolated Python virtualenv, Node workspace, or Docker volume so dependencies remain clean).
- 4Validate end-to-end behavior with a small sample input (Point Khoj at your Obsidian Markdown vault and reference PDFs via Docker, then schedule automated morning summaries using your preferred local or cloud model.)
Hardware & VRAM Notes
Runs on standard developer workstations without specialized hardware unless loading large local weights.
Modern multi-core CPU with 8 GB–16 GB RAM for orchestration, CLI agents, OCR/document parsing, or UI workflows (32 GB+ if co-hosting large local LLMs).
Optional unless running local neural weights; pairs cleanly with local inference servers (Ollama / llama.cpp) or remote endpoints.
Self-Hosted / App (GitHub)
Strengths & Best For
- Search across your documents
- Works with local or hosted models
- Chat interface
- Best suited for: Researchers, Note-takers
Limitations & Caveats
- Setup required
- Answer quality depends on the model
- Check the repo's license. Model weights may have a different license.
3 Similar Tools on /tools (Productivity)
Prefer a hosted web app instead of managing local weights or Docker containers? Explore these cloud alternatives.
Genei
Research workspace built for organizing PDFs into project folders, extracting key keywords, and drafting cited notes.
Notion AI & Workspace
Connected AI workspace for docs, notes, project management, and automated summaries.
NotebookLM
Personalized AI research assistant by Google grounded strictly on your uploaded documents.
| Factor | Khoj (Self-Hosted) | Genei | Notion AI & Workspace |
|---|---|---|---|
| Execution & Privacy | Runs locally via Self-Hosted / App (GitHub); data stays on your disk or private server. | Hosted cloud web interface; zero local dependency setup required. | Hosted cloud web interface; zero local dependency setup required. |
| Cost & Quota | AGPL-3.0 code; bound only by local CPU/GPU hardware. | Freemium; subject to vendor free-tier limits or paid plans. | Freemium; subject to vendor free-tier limits or paid plans. |
| Primary Fit | Search across your documents; Works with local or hosted models | Research workspace built for organizing PDFs into project folders, extracting key keywords, and drafting cited notes. | Connected AI workspace for docs, notes, project management, and automated summaries. |
| Key Trade-off | Setup required | Requires internet access and vendor account/quota limits. | Requires internet access and vendor account/quota limits. |
Matching Ready-Made Prompts
Customize variables in Live Prompt Studio for Khoj workflows.
Compare Alternatives
Compare Khoj side-by-side on setup ease, privacy, and role scorecards.
More Open Source Productivity & Research Repositories
Browser Use
Open-source Python and Playwright automation library allowing vision-enabled and tool-calling LLMs to browse, click, fill forms, and extract live web data.
Stirling-PDF
Self-hosted Docker and desktop PDF utility suite offering 50+ local operations including merge, split, OCR, redaction, compression, and signing.
Crawl4AI
Open-source asynchronous web crawler and scraper built on Playwright to turn dynamic JavaScript pages into clean Markdown, JSON schemas, and RAG chunks.
Frequently Asked Questions
What does Khoj do and how does it work?
Khoj (khoj-ai/khoj) is an open-source productivity & research project with 38,341 stars on GitHub. Open-source personal AI assistant and self-hosted workspace indexing Markdown, Org-mode, Notion, and PDFs for hybrid local or cloud RAG chat. Khoj runs as a self-hosted Docker/Python server with native browser, Obsidian, Emacs, and WhatsApp clients—combining local semantic embeddings, scheduled recurring web research automations, and support for Ollama, OpenAI, Anthropic, and Gemini.
Is Khoj free to self-host and use commercially?
Khoj provides open source code licensed under AGPL-3.0. Check the repo's license. Model weights may have a different license. Always verify both source code and model weight licenses in the GitHub repository before commercial deployment.
What hardware, runtime, or VRAM does Khoj require?
Khoj targets Self-Hosted / App (GitHub). Typical installation runs via `pip install khoj-assistant && khoj`. Setup required
How does self-hosting Khoj compare to hosted tools like Genei?
Self-hosting Khoj gives you full local data control, zero per-usage vendor fees, and customizable Self-Hosted / App (GitHub) pipelines—at the cost of managing your own setup and compute. By contrast, Genei (Freemium) runs in the browser with no local installation, though usage quotas and cloud privacy policies apply.
Is Khoj actively maintained and what workflow fits it best?
Repository metadata records 38,341 stars on GitHub with the latest recorded push on Aug 2, 2026. Point Khoj at your Obsidian Markdown vault and reference PDFs via Docker, then schedule automated morning summaries using your preferred local or cloud model.