Khoj

Normal
GitHub Python AGPL-3.0

Description

Khoj is a self-hostable AI second brain that answers questions from the web or your docs, builds custom agents, schedules automations, and performs deep research.

Key Features

  • Multi-LLM support — Switch between local and cloud LLMs including llama3, qwen, gemma, mistral, gpt, claude, gemini, deepseek
  • Multi-format document retrieval — Get answers from PDFs, Markdown, Word, Notion, org-mode, images and more
  • Custom agent creation — Build custom agents with custom knowledge, persona, chat model and tools
  • Multi-platform access — Access via browser, Obsidian, Emacs, desktop app, phone or WhatsApp
  • Semantic search — Advanced semantic retrieval to find relevant docs quickly with personal newsletters and smart notifications

Use Cases

💡 Personal knowledge management — Import documents, notes, emails into Khoj to build a conversational second brain
💡 Team knowledge sharing — Deploy enterprise version for teams, create custom agents for different roles
💡 Automated research briefings — Set up automations to generate personal newsletters from multiple sources delivered to inbox
💡 Obsidian note enhancement — Use Obsidian plugin to perform semantic search and Q&A on your notes

Strengths & Limitations

Strengths

  • High community interest (37.0k stars)
  • Established track record (5 years in production)
  • Responsive to issues, low backlog

⚠️ Limitations

  • Restrictive license (AGPL-3.0)

Quick Start

pip install khoj

# Start Khoj locally
khoj

Related Projects

MaxKB

22.7k · Python
Active A+

MaxKB is an open-source knowledge base Q&A and agent building platform powered by LLMs, with vector retrieval, workflow orchestration, and multi-model support out of the box.

knowledge-baseragchatbot +3
  • · RAG Pipeline — Document upload and online crawling with automatic splitting and vectorization to reduce hallucinations
  • · Agentic Workflow — Powerful workflow engine, function library and MCP tool-use for complex business scenarios
  • · Zero-code Integration — Seamlessly integrate into third-party business systems for smart Q&A capabilities

Kotaemon

25.7k · Python
Normal A

Kotaemon is an open-source RAG-based tool for chatting with your documents, featuring a clean chat interface and support for multiple LLM and embedding model backends.

ragdocument-qapdf +2
  • · Hybrid RAG pipeline — combines full-text and vector retrieval with re-ranking for best retrieval quality
  • · Multimodal document QA — supports PDF, HTML, XLSX formats with figure and table extraction from documents
  • · Advanced citations with document preview — relevance-scored citations with in-browser PDF viewer and highlight support

MemAgent

1.1k · Python
Stale B

A MemAgent framework that can extrapolate to 3.5M context tokens, along with a training framework for RL training of any agent workflow.

memoryagentrag +2
  • · Ultra-Long Context Processing: Extrapolate from 8K training context to 3.5M tokens with performance loss under 5%
  • · Reinforcement Learning Driven: Trained with RLVR (Reinforcement Learning from Verifiable Rewards), extends DAPO algorithm for end-to-end multi-turn conversation optimization
  • · Linear Time Complexity: Breaks through computational bottlenecks in long-text processing with linear resource scaling

Memori

16.3k · Python
Active A

Agent-native memory infrastructure that turns agent execution and conversation into structured, persistent state with an LLM-agnostic memory layer, MCP integration, and Python/TypeScript dual SDK support.

memoryagentrag +3
  • · Agent-native memory infrastructure converting conversations and execution into structured persistent state
  • · LLM-agnostic design supporting OpenAI, Anthropic, and any model provider
  • · Python/TypeScript dual SDK with MCP one-command integration for Claude Code/Cursor/Codex