explaingit

khoj-ai/khoj

34,605PythonAudience · developerComplexity · 4/5MaintainedLicenseSetup · hard

TLDR

Self-hosted AI assistant that searches your personal documents and chats with any AI model, local or cloud, while keeping your data private.

Mindmap

mindmap
  root((Khoj))
    What it does
      Chat with AI models
      Search personal documents
      Build custom agents
      Automate research tasks
    Access methods
      Web interface
      Desktop app
      Mobile app
      Plugins (Obsidian, Emacs)
      WhatsApp
    Document types
      PDFs
      Markdown files
      Word documents
      Notion pages
      Obsidian vaults
    AI models
      Local (Ollama)
      GPT, Claude, Gemini
      Llama
    Deployment
      Self-hosted
      Cloud hosted
      Docker support
    Use cases
      Research automation
      Daily briefings
      Knowledge base search
      Privacy-first chat

Things people build with this

USE CASE 1

Search and chat with your personal notes, PDFs, and work documents using AI without uploading them to the cloud.

USE CASE 2

Build a specialized AI assistant for a specific project or role by creating a custom agent with its own persona and document set.

USE CASE 3

Set up automated daily research briefings that search the web, summarize findings, and email you a newsletter.

USE CASE 4

Run a private AI assistant on your own hardware using local models like Ollama for complete data control.

Tech stack

PythonDockerOllamaOpenAIAnthropicGoogle Gemini

Getting it running

Difficulty · hard Time to first run · 1h+

Requires Docker, local LLM setup (Ollama) or multiple API keys (OpenAI/Anthropic/Gemini), plus document indexing infrastructure.

Open-source license allowing free use, modification, and distribution for any purpose including commercial use.

In plain English

Khoj is a self-hostable personal AI assistant that acts as a second brain, a single place to chat with AI models, search across your own documents, automate research tasks, and build custom AI agents. The core problem it addresses is that commercial AI assistants like ChatGPT only know what's in their training data: they cannot search your personal notes, PDFs, or work documents, and you cannot run them on your own hardware for privacy. Khoj bridges that gap. The system connects to a wide range of AI models, local models running on your machine through tools like Ollama, as well as cloud models like GPT, Claude, Gemini, or Llama, and lets you chat with whichever you prefer. Beyond plain conversation, Khoj indexes your documents (PDFs, Markdown files, Word documents, Notion pages, Obsidian vaults) and uses semantic search to find relevant passages before answering your question, so the AI can ground its answers in your actual files. You can create custom agents with a specific persona, a specific model, and a specific subset of your documents, essentially building a specialized assistant for different roles or projects. Scheduled automations let you set up recurring research tasks, for example, a daily briefing that searches the web, summarizes findings, and emails you a newsletter. Access is available through a web interface, a desktop app, a mobile app, Obsidian and Emacs plugins, and WhatsApp. You can self-host it on your own computer for complete privacy, or use the hosted cloud version at app.khoj.dev for a no-setup experience. You would use Khoj if you want an AI assistant that knows your personal knowledge base, respects your data privacy, and works with the AI model of your choice. It is a Python application, open-source under an open license, and deployable via Docker.

Copy-paste prompts

Prompt 1
How do I set up Khoj to index my Obsidian vault and chat with it using a local Ollama model?
Prompt 2
Show me how to create a custom Khoj agent that searches only my project documentation and uses Claude as the AI model.
Prompt 3
How can I configure a scheduled automation in Khoj to send me a daily email summary of web research on a specific topic?
Prompt 4
What are the steps to deploy Khoj on my own server using Docker while keeping all my documents private?
Prompt 5
How do I connect Khoj to my WhatsApp so I can chat with my personal knowledge base from my phone?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.