DEV.co
AI Frameworks · khoj-ai

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.

Source: GitHub — github.com/khoj-ai/khoj
35.5k
GitHub stars
2.3k
Forks
Python
Primary language
AGPL-3.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorykhoj-ai/khoj
Ownerkhoj-ai
Primary languagePython
LicenseAGPL-3.0 — OSI-approved
Stars35.5k
Forks2.3k
Open issues116
Latest release2.0.0-beta.28 (2026-03-26)
Last updated2026-06-24
Sourcehttps://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.

Quickstart

Get the khoj source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/khoj-ai/khoj.gitcd khoj# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Personal knowledge management with AI search

Combine Obsidian/local documents with semantic search and LLM reasoning to create a private, queryable personal knowledge base without cloud dependency.

Multi-tenant or on-premises enterprise RAG

Deploy as self-hosted or hybrid to keep sensitive corporate documents on-prem while leveraging LLM reasoning and agent automation for research, Q&A, and reporting.

Custom AI agent workflows and automation

Build role-specific agents with custom knowledge, persona, and tools; schedule research and content delivery (newsletters, alerts) without engineering a full AI platform.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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

Related 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?
Both. Khoj is self-hostable on your computer or server via Docker. Alternatively, try the free cloud app at app.khoj.dev with no setup. Self-hosting allows full privacy and control.
What LLMs does Khoj support?
Local LLMs (llama3, qwen, gemma, mistral via llamacpp) and API-based providers (GPT, Claude, Gemini, DeepSeek). You can mix and match or set fallbacks.
What are the license restrictions if I want to commercialize or fork Khoj?
Khoj is AGPL-3.0. Any network-facing derivative must open-source modifications and disclose source to users. Internal self-hosted use is free; commercial cloud deployment requires either licensing from Khoj or open-sourcing your code.
How are documents indexed and can I search across multiple sources?
Khoj ingests PDFs, Markdown, Notion, Word, org-mode, and more. Semantic search queries multiple indexed sources. Real-time sync and indexing speed depend on document volume and chosen ingestion method; no official benchmarks provided.

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.