Back to directory

AI & Machine Learning · AI Interaction & Interfaces

Khoj

A self-hosted AI assistant for documents, research, and automation

Khoj is an AGPL-3.0 personal AI application for searching documents, researching the web, creating agents, and scheduling tasks. It targets individuals and organizations that want self-hosted control, with browser, editor, desktop, phone, and WhatsApp interfaces. Khoj Cloud deprecation was announced in March 2026, and no current public hosted price is published.

Key facts

License
AGPL-3.0
Main language
Python, TypeScript, JavaScript
Maintainer
Khoj AI, founded by Saba Imran and Debanjum
First released
2021
Latest release
2.0.0-beta.28, March 26, 2026
GitHub stars
37,783, October 2026
Hosted option
Khoj Cloud deprecation announced March 2026; no current public price

What Khoj is

Khoj began in 2021 as a local natural-language search tool for Emacs and Org-mode notes, founded by Saba Imran and Debanjum. Debanjum started working on it full time in 2022, and the project joined Y Combinator in 2023. GitHub showed 37,783 stars, and its history names Meta as a partner on WhatsApp integration. The maintainers describe Khoj as an applied artificial-intelligence company that expanded from note search into a personal AI platform. Its Python repository was created in August 2021. Releases continued through 2025 and 2026, adding memory, research, model integrations, and client fixes. The project does not publish a simple current contributor total or a funding amount. Debanjum and Saba Imran appear among the leading named contributors.

How it works

Khoj combines chat with personal files, web research, semantic search, custom agents, scheduled tasks, image generation, speech, and messaging clients. A typical user connects a folder, Obsidian vault, Notion workspace, or another supported source, waits for indexing, then asks questions in the web app or a client such as Obsidian, Emacs, desktop, phone, or WhatsApp. Agents can receive a persona, knowledge sources, model, and tools. Research tasks can search and read web pages, execute code in a sandbox, and return references. Scheduled automations can produce newsletters or notifications. The product supports local and hosted language models, including Ollama-compatible endpoints, OpenAI, Anthropic, Google, and other OpenAI-compatible providers. Each provider and tool adds configuration, credentials, and an external dependency.

Architecture and recent releases

Khoj is primarily a Python application with a Django server, a Next.js web interface, and PostgreSQL with pgvector for indexed embeddings. The Docker Compose deployment includes the server, database, Terrarium code sandbox, SearXNG search, and an optional computer-use container. The default server listens on port 42110. Pip installation is documented for Python 3.10 through 3.12, while desktop and client integrations are maintained separately. The 2.0 beta line added long-term memories, parallel research tool calls, model fallbacks, improved web handling, and a Next.js 15 upgrade. Release 2.0.0-beta.28 arrived on March 26, 2026, fixing a web-app issue after memories were disabled and correcting the Khoj Cloud deprecation banner. Persistent volumes hold configuration and database data.

License and pricing

Khoj uses the GNU Affero General Public License version 3.0. AGPL-3.0 permits commercial use, modification, and redistribution, while modified network software must provide corresponding source and license notices. The self-hostable application is not described as an open-core split. The company has offered cloud, on-premises, and hybrid arrangements, but March 2026 release notes announced Khoj Cloud deprecation and disabled new subscriptions. No current public hosted or enterprise price is published. Self-hosting has no Khoj subscription fee, although model APIs, search services, storage, hardware, and electricity may cost money. Operators offering modified network software should review AGPL obligations before deployment. Companies needing private support must ask Khoj about commercial arrangements because public enterprise pricing is absent.

Limitations and how it compares

Khoj demands more operational work than a basic chat front end. Its integrations require decisions about remote services, credentials, indexing, model costs, and network exposure. Compared with AnythingLLM, Khoj places more emphasis on agents, scheduled research, and client integrations, while AnythingLLM presents a narrower document-chat workflow. Compared with Open WebUI, Khoj focuses more on personal knowledge and automation, while Open WebUI focuses more on model access and chat. Compared with ChatGPT, Khoj offers self-hosting and greater control over stored files, while ChatGPT offers a simpler managed service. Local models also require suitable hardware. Pick Khoj when personal document search and automation justify running the stack and maintaining its supporting services.

Main features

  • Document chat. Indexes PDFs, Markdown, Word, Org-mode, Notion, and other sources so users can ask questions about personal material.
  • Web research. Research agents search and read online sources, combine findings, execute code when configured, and return answers with references.
  • Custom agents. Users configure personas, knowledge sources, models, and tools for specialized assistants and repeatable tasks within the application’s supported workflow.
  • Long-term memory. The 2.0 beta series stores durable memories and uses them during later conversations and agent work.
  • Client integrations. Browser, Obsidian, Emacs, desktop, phone, and WhatsApp interfaces provide several routes to the same server.
  • Local model support. Self-hosted deployments can connect to Ollama or other OpenAI-compatible endpoints instead of remote model services.
  • Scheduled automation. Agents can produce newsletters, notifications, and recurring research without a user starting each run within the application’s supported workflow.

Self-hosting Khoj

Docker Compose is the documented route, starting the Khoj server and PostgreSQL with pgvector, with optional Terrarium, SearXNG, and computer-use services. The development documentation also covers pip installation with Python 3.10 through 3.12 and desktop packages. The published configuration exposes port 42110 and stores configuration, database, model, search, and computer data in persistent volumes. Documented hardware guidance lists 8GB RAM and 5GB disk as minimums, with 16GB RAM, 20GB storage, four CPU cores, and 8GB VRAM preferred for local inference. Set non-default credentials and secrets, restrict network access, use HTTPS remotely, back up persistent data, and rebuild images when upgrading source changes.

Strengths

  • AGPL licensing permits commercial use while preserving access to modified source under its terms.
  • One installation combines document search, web research, agents, and recurring tasks.
  • Users can connect local models or several commercial model providers.
  • Obsidian, Emacs, desktop, phone, and WhatsApp clients broaden access to one knowledge base.

Drawbacks

  • The Docker configuration adds database, sandbox, search, and optional computer services to administer.
  • Khoj Cloud deprecation removes a current public subscription path and leaves hosted pricing unpublished.
  • Local models and computer-use features require more hardware and security work than basic chat.

What teams replace with it

Teams usually evaluate Khoj when they want to move off ChatGPT, Perplexity, Notion AI, Mem.

For side-by-side commercial comparisons, browse our alternatives hub.

Open-source alternatives to Khoj

Frequently asked questions

Is Khoj free?

The self-hosted application is available under AGPL-3.0 and has no Khoj subscription fee. Running it can still incur costs for a server, model APIs, web-search services, storage, and electricity. March 2026 release notes announced Khoj Cloud deprecation and disabled new subscriptions, so a current hosted subscription should not be assumed.

Can a company use Khoj commercially?

Yes. AGPL-3.0 permits commercial use, modification, and redistribution. Companies distributing modified versions or offering modified functionality over a network must follow the license's source and notice obligations. Enterprise, on-premises, and hybrid arrangements have been described by the project, but public enterprise pricing is not listed.

How do I self-host Khoj?

Install Docker and Docker Compose, configure the repository's Compose settings, set secure administrator credentials and a Django secret, then start the services. The stack uses PostgreSQL with pgvector. Pip installation is also documented for Python 3.10 through 3.12. Persist configuration and database volumes, and protect remote access with authentication, firewall rules, and HTTPS.

How does Khoj compare with Open WebUI?

Open WebUI primarily provides a model-chat interface, while Khoj centers on personal documents, semantic search, research agents, scheduled automation, and client integrations. Both can connect to local or remote models. Khoj requires more services and configuration, making Open WebUI the easier choice for straightforward local chat and Khoj the better fit for a personal knowledge workflow.

Is my data private in Khoj?

Self-hosting keeps the application and indexed data on infrastructure you control, and local models can reduce transfers to remote providers. Privacy still depends on configuration because remote model, search, speech, image, or webpage services may receive submitted data. Secure the administrator account, secret key, database, network exposure, and optional computer-use service before remote access.

Similar projects to compare

Sources

Last updated 2026-10-22.