khoj
Khoj is a self-hosted AI assistant that lets you chat with local or cloud LLMs and search your documents. It integrates with Obsidian, Emacs, browser, desktop, and mobile, and supports building custom agents with automations and RAG capabilities.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | khoj-ai/khoj |
| Owner | khoj-ai |
| Primary language | Python |
| License | AGPL-3.0 — OSI-approved |
| Stars | 35.5k |
| Forks | 2.3k |
| Open issues | 116 |
| Latest release | 2.0.0-beta.28 (2026-03-26) |
| Last updated | 2026-06-24 |
| Source | https://github.com/khoj-ai/khoj |
What khoj is
Python-based RAG platform supporting multiple LLM backends (local and proprietary), semantic search, multi-document indexing (PDF, Markdown, Notion, Word, org-mode), agent scaffolding, and API-first architecture. Deployable on-device or cloud via Docker.
Get the khoj source
Clone the repository and explore it locally.
git clone https://github.com/khoj-ai/khoj.gitcd khoj# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Decide LLM strategy upfront: local (llama3, qwen via ollama/llamacpp) for privacy vs. API keys (GPT, Claude, Gemini) for capability. Each has cost and latency tradeoffs.
- Plan document indexing scope and format. Khoj supports multiple formats but ingestion performance and deduplication strategy depends on volume and churn rate.
- Self-hosted deployment requires a Kubernetes cluster, Docker setup, or local machine with sufficient VRAM for local LLMs. Cloud deployment via khoj.dev app offloads this.
- Custom agents need defined knowledge sources, tools, and personas. Start with templates or simple retrieval-only agents before adding tool-use or automation.
- Authentication and multi-user isolation are built-in but access control details require review of latest code; default deployments may not be hardened for untrusted networks.
When to avoid it — and what to weigh
- Proprietary, closed-source requirement — Khoj is AGPL-3.0 licensed. Any derivative or network-facing deployment must disclose source. If you need a permissive license or cannot open-source modifications, this is not suitable.
- Minimal LLM platform setup preferred — Khoj requires integrating an LLM (local or via API key). If you want zero LLM configuration overhead, a fully managed SaaS or thin wrapper is better.
- Extreme low-latency or real-time document sync — Khoj indexing and RAG retrieval are not optimized for sub-second response windows or real-time collaborative document updates. Use if typical latency of seconds is acceptable.
- HIPAA or strict regulated data handling — No security audit, compliance certification, or data handling documentation visible. Requires independent security review before handling regulated data (health, finance, PII).
License & commercial use
AGPL-3.0 (GNU Affero General Public License v3.0). Requires source disclosure for any network-facing derivative or modification. Copyleft license—any use as a service must make source available to users.
AGPL-3.0 is a copyleft license. Commercial use is permitted, but if you modify Khoj or offer it as a service, you must disclose the source code to users. Khoj offers a commercial cloud service (app.khoj.dev) and enterprise solutions; using their SaaS avoids AGPL obligations. Self-hosting for internal use is allowed. Requires legal review before distributing derivatives or running as a SaaS offering without licensing from Khoj.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
No independent security audit, pentesting, or vulnerability disclosure process mentioned. AGPL source is available for review. Considerations: LLM API keys stored; authentication mechanism not detailed; agent tool execution (web, file, API) has no built-in sandbox; local LLM inference may expose system if VRAM/compute limits are not enforced. Deployment on untrusted networks requires independent hardening. No mention of encryption at rest or in transit, RBAC details, or audit logging.
Alternatives to consider
LangChain / LlamaIndex
Lower-level frameworks for RAG and agent building. Require more engineering to reach Khoj's feature parity but offer finer control and permissive MIT licensing.
Perplexity / Mistral Chat
Fully managed SaaS with built-in web search and document support. No self-hosting, no AGPL obligations, but closed-source and vendor lock-in.
Private Gpt / LocalGPT
Lightweight, privacy-focused, local-only alternatives. Simpler but fewer features (no agents, limited integrations, smaller community) than Khoj.
Build on khoj with DEV.co software developers
Start with a free trial on app.khoj.dev, review the AGPL license implications, and plan your LLM and deployment strategy. Contact Khoj for enterprise licensing or schedule a Devco consultation to assess integration complexity.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
khoj FAQ
Do I have to use Khoj's cloud service or can I self-host?
What LLMs does Khoj support?
What are the license restrictions if I want to commercialize or fork Khoj?
How are documents indexed and can I search across multiple sources?
Software development & web development with DEV.co
Need help beyond evaluating khoj? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and ai frameworks integrations — and maintain them long-term.
Ready to evaluate Khoj for your use case?
Start with a free trial on app.khoj.dev, review the AGPL license implications, and plan your LLM and deployment strategy. Contact Khoj for enterprise licensing or schedule a Devco consultation to assess integration complexity.