AI/TLDR

Khoj

Self-hostable AI second brain that answers from your docs and the web

Assistants & ChatbotsOpen source
Language
Python
License
AGPL-3.0

Overview

Khoj is an open-source personal AI app that the project calls your "AI second brain." You can run it privately on your own computer or use the hosted cloud app. It connects to any local or online language model, so you can pick the model that fits your needs, from Llama 3 and Mistral running on your machine to GPT, Claude, Gemini, or DeepSeek in the cloud.

What sets Khoj apart from a plain chatbot is that it answers from your own material. It reads your documents, including PDFs, Markdown, Word files, Notion pages, org-mode notes, and images, and it can also pull answers from the internet. Semantic search helps you find the right document quickly, and you can build custom agents with their own knowledge, persona, model, and tools.

Khoj is self-hostable and open-source, and it reaches you where you already work: a browser, Obsidian, Emacs, a desktop or phone app, and WhatsApp. It can also automate repetitive research, send personal newsletters and notifications, generate images, and read messages aloud.

What it does

  • Chat with any local or online LLM, including Llama 3, Qwen, Gemma, Mistral, GPT, Claude, Gemini, and DeepSeek
  • Get answers from your own documents (PDF, Markdown, Word, Notion, org-mode) and from the internet
  • Semantic search to find relevant documents quickly
  • Build custom agents with their own knowledge, persona, chat model, and tools
  • Use it from the browser, Obsidian, Emacs, desktop, phone, or WhatsApp
  • Automate research with personal newsletters and smart notifications, plus image generation and text-to-speech

Getting started

You can try Khoj instantly on the hosted cloud app, or self-host it on your own machine. The commands below come from the official setup docs for a local, single-user install.

Try it without installing

Open the hosted app in your browser to use Khoj right away with no setup. This is the fastest way to see what it does before self-hosting.

texttext
https://app.khoj.dev

Install Khoj locally with pip

Install the package with local model support. On Apple Silicon or an NVIDIA GPU you can prefix the command with the matching CMAKE_ARGS shown in the docs to enable hardware acceleration.

bashbash
python -m pip install 'khoj[local]'

Start the server

Run Khoj in anonymous mode for a local single-user setup. On first run you will be prompted to create an admin account and configure your chat models. The server is ready when the logs show "Khoj is ready to engage."

bashbash
USE_EMBEDDED_DB="true" khoj --anonymous-mode

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Build a private knowledge base that answers questions across your PDFs, notes, and Notion docs without sending data to a third party
  • Run a self-hosted personal assistant that combines local or cloud LLMs with semantic search over your own files
  • Create custom agents with a specific persona, knowledge set, and tools for recurring tasks like research summaries
  • Automate repetitive research and receive personal newsletters and smart notifications in your inbox

How Khoj compares

Khoj alongside other open-source assistants & chatbots tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
OpenClaw★ 390kOpenClaw is a self-hosted personal AI assistant that answers you on WhatsApp, Telegram, Slack, Discord, and many other channels, with voice and a live visual canvas.
Hermes Agent★ 247kA self-improving personal AI agent from Nous Research that builds skills from experience, remembers across sessions, and reaches you on Telegram, Discord, Slack, and more.
Odysseus★ 87.4kA self-hosted AI workspace that puts chat, agents, deep research, documents, email, notes, tasks and calendar behind one Docker Compose stack, over local or API models.
CowAgent★ 47.1kA self-hosted assistant that plans and executes tasks with built-in file, terminal, browser and search tools, and answers across a web console plus a dozen messaging platforms.
AstrBot★ 40.7kAn all-in-one agent chatbot platform that puts LLM conversations, tools, knowledge bases and a plugin marketplace inside messaging apps like Telegram, Slack, Discord, QQ and Feishu.
OpenHuman★ 39.9kA local-first desktop personal AI for macOS, Windows and Linux that keeps a compressed memory tree on your machine and orchestrates checkpointed research and automation workflows.
MindsHub★ 39.8kAn agent workspace for knowledge work and software development that runs swappable open-source agent harnesses against your choice of frontier or open models.
Khoj★ 37.4kSelf-hostable AI second brain that answers from your docs and the web