Khoj

A personal AI that knows your notes and documents and can research the web for you.

AI helpers AGPL-3.0-or-later

What it does

Khoj is an AI assistant that reads your own notes and files (PDFs, Word, Markdown, Obsidian, Notion) and answers questions about them, alongside fresh results from the web. You can make custom helpers with their own personality, schedule regular research emails, and reach it from the browser, Obsidian, Emacs, the desktop or your phone. It works with local models through Ollama or with cloud models such as ChatGPT, Claude and Gemini.

  • Answers from your own notes and documents, with sources
  • Web research through a private, self-hosted search engine
  • Custom agents and scheduled research emails
  • Use it from the browser, Obsidian, Emacs, desktop or phone

Great for: Note-takers, students and curious people who want an AI that knows their own notes and can research the web, ideally running at home.

  • LicenceAGPL-3.0-or-later
  • Where it runsOnline (about $5/month, usage-based) · Your computer (free)
  • Built withpython, typescript
  • Your dataStays in your own copy
  • Sourcekhoj-ai/khoj

Ways to use it

Choose one when you tell your AI. It sets everything up with you, in plain words.

  • Online with Railway about $5/month, usage-basedA general-purpose host that can run any of these apps, including your own customised version. Usage-based pricing with a free trial. Third-party host.
  • On my own computerFreeYour AI installs what it needs and explains each step. It works while your computer is on.

Khoj has no login by default: keep it private, or ask your AI to add a password before putting it online.

Hosts are independent companies, not BespokeAI. You sign up and pay them directly. We may earn a referral fee, which never changes your price.

How people are using this project

Examples of what people ask their AI to do with Khoj. Start from one, or just tell your AI and it will ask what you'd like.

Can I trust it?

  • AGPL-3.0-or-later. Free to use and change. If you run a changed version that other people use over the internet (not just your own household), you must offer them your source code under the same licence. Private use has no extra obligations.
  • Your data: stores personal data, on your own device or server. Notes, document text, embeddings, chats, agents and automations in PostgreSQL with pgvector (khoj_db volume). Downloaded search models in khoj_models; settings in khoj_config.
  • Other services: Chat model provider (OpenAI, Anthropic, Google Gemini, or any OpenAI-compatible API) (optional, pay-per-use with your own key); Ollama, LM Studio or vLLM (optional, free (uses your own computer)); SearXNG (bundled in docker-compose) (optional, free, self-hosted); Terrarium sandbox (bundled) or E2B (optional, free (Terrarium) or pay-per-use (E2B)); Resend (email) (optional, free tier available); PostHog telemetry (optional, free)
  • Pinned version ae229ca. Every handover uses exactly this code, which we've reviewed.
  • The default docker-compose runs in anonymous mode with no login. Keep it on your own computer, or remove --anonymous-mode and set up logins before other people or the internet can reach it.
  • Change KHOJ_ADMIN_PASSWORD, KHOJ_DJANGO_SECRET_KEY and the Postgres password from the defaults in the compose file before first start.
  • When you chat with a cloud model, relevant snippets of your notes are sent to that provider. Use Ollama or another local model to keep everything at home.
  • The default compose file also starts a "computer" container (a desktop the AI can control when KHOJ_OPERATOR_ENABLED is on) and publishes its VNC port 5900. Delete that service if you don't need it, and never expose port 5900 to the internet.
  • The compose file uses :latest images, so the version you run may be newer than the pinned commit. Pin image tags for predictable updates.

Did it work for people?

No reports yet

Be the first to tell others how it went.

Tell us how it went

One private chat window for ChatGPT, Claude, Gemini and models on your own computer.

AI helpers

Ask questions about your own documents with an AI that can run entirely on your computer.

AI helpers