简体中文

Khoj 评测:Khoj Cloud 关闭后自托管这款 AI 第二大脑

Khoj Cloud 已于 2026 年 4 月关闭,自托管成了唯一选择。本文介绍 Khoj 仍然擅长什么、开发放缓到了什么程度,以及部署需要做什么。

访问 Khoj

Khoj 是一款开源个人 AI,能基于你自己的笔记和文档以及网络内容回答问题。它是我们列表中最老的项目之一,2022 年 8 月在 PyPI 上发布首个版本,截至我们 2026 年 11 月 8 日查看时有 38,065 颗 GitHub 星。

它的处境也与这里的其他工具都不同。其开发者已于 2026 年 4 月 15 日关闭托管版 Khoj Cloud,转而专注于其他产品 Open Paper 和 Pipali。代码仍然开源、可以自托管,但如果你今天选择 Khoj,就意味着你选择自己运行它,而且几乎得不到上游的帮助。

Khoj web app home with a greeting, agent shortcuts for Khoj, Legal, Simplify and Professor, a message box with attach and microphone buttons, and suggestion cards for Paint, Finance and Automation
The Khoj web app's start screendocs.khoj.dev

Khoj 还在维护吗?

只是零星维护。最新版本 2.0.0-beta.28 发布于 2026 年 3 月 26 日(releases),最后一次提交是在 2026 年 8 月 2 日(提交历史)。今年仍有零星修复合入,例如 8 月的 #1382,它让遥测不再发送客户端 IP。但请预期更新会很少,并做好自己负责所需修复的准备。

对于一个会索引你私人笔记并调用模型 API 的工具来说,维护缓慢比静态应用更要紧。模型提供商会修改 API,依赖也会老化。请固定版本,并预期偶尔需要自己做些维护工作。

它擅长什么

Khoj 不是像 OpenClaw 那样的通用聊天应用智能体。它是一个第二大脑。它会索引 Markdown、Org-mode、PDF、Word、Notion 和 GitHub 内容,然后基于这些内容和网页搜索回答问题。Obsidian 和 Emacs 插件让你可以在写笔记的地方直接查询笔记。

围绕这一核心,它还提供自定义智能体(每个都有自己的人设、知识、聊天模型和工具),以及图像生成、语音聊天,和按计划运行查询并把结果通过邮件发给你的自动化。

安装

自托管部署文档提供了两种方式:Docker Compose(Windows 上通过 WSL2)或使用 Python 3.10 到 3.12 的 pip。推荐走 Docker Compose。它还会启动运行生成代码的本地 Terrarium 沙箱。

你可以通过 Web 应用或 Obsidian 和 Emacs 插件使用它。没有聊天应用渠道:没有 Telegram、Slack 或 Discord。WhatsApp 机器人与 Khoj Cloud 绑定,已随之关闭。

自托管时,定时自动化邮件需要额外配置:自动化文档要求配置 Resend 和身份认证。没有它们,定时研究功能的结果就到不了你的收件箱。

Khoj Agents page listing personas such as Copywriter, Health, Legal, Professor, Teacher and Technical Lead, each with its prompt and a chat button, plus a Create Agent button
Choosing or creating custom agents in Khojdocs.khoj.dev

本地模型与硬件

这是 Khoj 在隐私方面的强项。它支持 OpenAI、Anthropic、Gemini、Vertex AI 或任何 OpenAI 兼容 API,也支持 Ollama、LM Studio、vLLM,或通过 llama.cpp 完全离线运行 GGUF 模型(Ollama 指南)。它在你的机器上生成嵌入向量,所以配合本地聊天模型时,你的文档永远不会离开你的机器。使用托管模型时,文档的相关部分会作为上下文发送给该提供商。

运行离线模型时,有 CUDA、ROCm、Vulkan 或 Apple Metal GPU 会更好。

沙箱

Khoj 生成的代码在 Docker Compose 为你启动的 Terrarium 沙箱中运行(代码执行文档)。

遥测:默认开启

Khoj 默认发送匿名化的使用元数据:你使用的客户端、搜索和聊天 API 的使用情况、已配置的内容类型,以及主机和来源页等请求元数据,但不包括你的内容。遥测文档称数据发送到 PostHog。如果你完全不想发送,请在首次启动前在环境中设置 KHOJ_TELEMETRY_DISABLE=True。隐私页面称开发者不会出售数据,也不会用其训练模型。

Khoj automation dialog setting a weekly Monday 9:00 AM run with instructions to compile a news recap, a workout and a quote, sent by email
Scheduling a weekly research email with a Khoj automationdocs.khoj.dev

许可证

Khoj 采用 AGPL-3.0,不同于我们列表中大多数采用 MIT 和 Apache 的工具。对个人使用来说这没有任何影响。如果你修改了 Khoj 并通过网络向他人提供服务,就必须公开你的修改。

适合谁用

对于想在自己笔记上使用私有 AI 的 Obsidian 和 Emacs 用户,以及想要一个基于本地模型的自托管研究助手、并且能在没有上游支持的情况下自己维护的人,Khoj 仍然有意义。如果你想要一个驻留在聊天应用里的智能体,或者一个有活跃发布周期的项目,它就是错误的选择。

值得一看的替代品

  • nanobot 把记忆保存在纯 Markdown 文件中,支持定时自动化,并且在积极开发中,但它是通用智能体,而不是笔记搜索工具。
  • QwenPaw 可以基于本地模型完全离线运行,有 Markdown 记忆和聊天应用渠道。
  • Agent Zero 在自己的 Docker 工作区中处理研究和文档任务,并提供本地搜索和语音。

更多可在你自己硬件上运行的选择,请看最佳本地 AI 智能体。

价格

Khoj: 价格
Open source免费
  • AGPL-3.0 licensed and free to self-host
  • You pay your chosen model provider, or run models offline
  • The hosted Khoj Cloud closed on April 15, 2026

功能

功能
联网搜索是
图像生成是
语音模式是
文件上传是
记忆是
代你执行操作是
应用集成是
自主运行是
主动给你发消息是
可运行多个机器人是

优点

  • Searches and chats over your own notes and documents, including Markdown, Org-mode, PDF, Word, Notion and GitHub
  • Works with local models through Ollama, LM Studio, vLLM or offline llama.cpp, and generates embeddings on your machine
  • Custom agents with their own persona, knowledge, chat model and tools
  • Automations run a query on a schedule and email you the result
  • Generated code runs in a local Terrarium sandbox that the Docker Compose setup starts for you

缺点

  • Development has slowed: no release since March 26, 2026, the last commit was on August 2, 2026, and the team now focuses on other products
  • The hosted Khoj Cloud, and with it the WhatsApp bot, shut down on April 15, 2026, so self-hosting is the only way to use it
  • AGPL-3.0 requires you to share your changes if you offer a modified version to others over a network
  • Sends anonymized usage telemetry by default until you set KHOJ_TELEMETRY_DISABLE
  • Scheduled emails need Resend and authentication set up when self-hosting, and no chat apps such as Telegram or Slack are supported

适合人群

  • Obsidian and Emacs users who want a private AI over their notes
  • People who want a self-hosted research assistant on local models

来源