Khoj logo

Khoj

Visit

Self-hostable AI second brain: chat with your docs and the web, custom agents, and automations. AGPL-3.0 open source.

Share:
View alternatives

Khoj is an open-source personal AI that turns your files and the public web into a second brain you can chat with. The GitHub repo khoj-ai/khoj is AGPL-3.0, created August 16, 2021. On 2026-09-05 the API listed about 37,088 stars. You can run it on your machine, or use the hosted app at app.khoj.dev. The same company also ships Open Paper and a newer desktop coworker called Pipali. This page is the Khoj app, the product the X For You feed was pointing at.

If you only want a local Markdown vault, start with Obsidian. If you want a hosted notebook, compare NotebookLM. If the job is a git repo, use Claude Code.

Key Features

  • Chat with your stuff: PDFs, Markdown, plaintext, org-mode, Word, images, and Notion. Web search is optional, not mandatory.
  • Any model you already pay for: OpenAI, Anthropic, Gemini, or an OpenAI-compatible local server (Ollama, vLLM, LM Studio). Offline chat is documented as needing roughly 8 GB RAM minimum and 16 GB VRAM recommended.
  • Clients beyond the browser: desktop app, Obsidian plugin, Emacs package, WhatsApp. Default self-host URL is http://localhost:42110.
  • Agents and automations: custom persona, tools, and knowledge per agent; scheduled research that can land in your inbox.
  • Semantic search: natural-language find across the synced corpus, not just chat.

Limitation: self-host is a real server (Docker Compose or pip), not a single binary. First-run admin setup is required. The company homepage now leads with Pipali and Open Paper, so do not confuse those SKUs with this repo.

Use Cases

  • Researchers and writers who keep PDFs and notes locally and want answers with the files still on disk.
  • Obsidian or Emacs users who want an AI layer without uploading the vault to a closed host.
  • Privacy-sensitive setups that need the index to stay on a private network, including offline once models are local.

Pricing

The self-hosted server is free software under AGPL-3.0. You still pay for whatever chat API or GPU you attach.

Khoj Cloud exists at app.khoj.dev. We did not find a public, dated pricing table on docs.khoj.dev as of 2026-09-05, so we are not listing dollar amounts for Cloud. Check the hosted app before you assume a free forever plan.

Enterprise / teams copy on khoj.dev describes cloud, on-prem, and hybrid. Treat that as sales, not a SKU we verified.

Getting Started

Self-host with Docker, from the setup docs:

  1. mkdir ~/.khoj && cd ~/.khoj && wget https://raw.githubusercontent.com/khoj-ai/khoj/master/docker-compose.yml
  2. Set KHOJ_ADMIN_PASSWORD and KHOJ_DJANGO_SECRET_KEY. Add OPENAI_API_KEY, ANTHROPIC_API_KEY, or GEMINI_API_KEY if you want hosted models. Point OPENAI_BASE_URL at Ollama if you want local.
  3. docker-compose up and wait for Khoj is ready to engage.
  4. Open http://localhost:42110. Use localhost, not 127.0.0.1, for the admin panel or you can hit CSRF errors.
  5. Sync files with the desktop, Obsidian, or Emacs client, or drag files into the web app.

Pip install is python -m pip install 'khoj[local]' then USE_EMBEDDED_DB="true" khoj --anonymous-mode.

Frequently Asked Questions

Do I have to self-host?

No. app.khoj.dev is the hosted path.

What files does it read?

PDF, plaintext, Markdown, org-mode, Word, images, and Notion via the documented integration. Do not assume every office format works.

Is it the same as Pipali?

No. Pipali is a separate open-source desktop coworker. Khoj is the second-brain server and clients.

Alternatives

  • Obsidian: local notes without an AI server.
  • NotebookLM: Google-hosted notebooks if you do not want to run Docker.
  • Claude Code: if the corpus is a repository, not a personal knowledge base.

Tips

  1. Restart the server after the first run. The docs say settings will not all apply until you do.
  2. Keep the host URL on clients at http://localhost:42110. localhost vs 127.0.0.1 matters for admin login.
  3. If you only need paper reading, look at Open Paper instead of stretching Khoj into a lab notebook.

Conclusion

Khoj is a self-hostable second brain with real clients for Obsidian, Emacs, and desktop, AGPL-3.0, and an optional cloud app. Start at docs.khoj.dev or skip ops and open app.khoj.dev.

Comments

No comments yet. Be the first to comment!