# Khoj vs PrivateGPT

> PrivateGPT scores 53.2 (D) to Khoj's 38.8 (E) for memory search. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/khoj-vs-privategpt
- Markdown: https://www.anchorterminal.com/compare/khoj-vs-privategpt.md (~4,850 tokens)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-07

PrivateGPT scores 53.2 (D) on agent readiness against Khoj's 38.8 (E), and leads in 6 of 7 scored categories. Both do memory search.

- Khoj: grade E, 38.8/100, rank #1351 of 1510. Markdown https://www.anchorterminal.com/tools/khoj.md · JSON https://www.anchorterminal.com/api/v1/tools/khoj.json
- PrivateGPT: grade D, 53.2/100, rank #960 of 1510. Markdown https://www.anchorterminal.com/tools/privategpt.md · JSON https://www.anchorterminal.com/api/v1/tools/privategpt.json
- Best local AI models and assistants: https://www.anchorterminal.com/best/local-ai/index.md
- All 280 local ai comparisons: https://www.anchorterminal.com/compare/local-ai/index.md

## Which one, for what

### Khoj (E)

Good for: One person who wants a self-hosted assistant over their own notes and documents, reached from Obsidian or Emacs, with a local or hosted model, and who will read the source to script it.

Watch for: No tagged release since 2.0.0-beta.28 on 26 March 2026 and no commit since 2 August

### PrivateGPT (D)

Good for: A local backend for apps and agents that want an Anthropic-style API with document retrieval, citations and tools over local models.

Ahead on:
- Reliability, 70 against 65
- Schema & documentation, 83 against 34
- Agent ergonomics, 64 against 46
- Maintenance & community, 41 against 19

Also in its favour:
- No key needed to call it

Watch for: Authentication is off by default, the server binds 0.0.0.0 and CORS allows every origin


## Why the edge

### Schema & documentation: PrivateGPT +49

- Khoj (34): Graded on the HTTP API under /api, the interface an agent calls. Khoj calls MCP servers in research mode but doesn't run one. In 1.42.10, 2.0.0-beta.28 and master the app turns off only the Swagger UI (`docs_url=None`), so FastAPI's /openapi.json stays at its default on a running server. That's a machine-readable contract an agent could fetch, but it isn't published, linked or mentioned in the docs, and we read it from the source rather than a running server (10 of 25). No llms.txt or Markdown copies in the docs source (0). The docs explain the app to people and have no API reference, and route docstrings are one line or missing (3 of 20). FastAPI types the query parameters and Pydantic types the chat body, with one enum (search type `t`), bounds only on the chat export route, no free-form JSON bodies, and single-letter names (`q`, `n`, `t`, `r`, `d`) with no descriptions (8 of 15). No API examples in the docs (the one curl example is for the Terrarium sandbox) and no documented errors, though the query-filter page shows the filter syntax that goes inside `q` (3 of 15). Dated release notes on GitHub for each beta, and no version prefix on the routes (10 of 15).
- PrivateGPT (83): An OpenAPI file of 38 paths in the repository (fern/openapi/openapi.json, version 1.0.1), also served by each instance at /openapi.json, with the messages API modelled on Anthropic's (25). docs.privategpt.dev serves llms.txt, a Markdown copy of every page and a docs MCP server (10). The docs explain each endpoint group, startup and model discovery, and a compatibility table says which parts of the Claude API are supported, partial or missing, such as prompt caching and OAuth (15 of 20). Pydantic models with literal type discriminators and required fields, while settings and tool context are wide objects (12 of 15). curl examples for each guide and a `/v1/messages/validate` route, with error shapes not documented as a list (9 of 15). `/v1` paths and a dated changelog, though releases trail main by more than four months (12 of 15). 25 + 10 + 15 + 12 + 9 + 12 = 83.

### Maintenance & community: PrivateGPT +22

- Khoj (19): The last tagged release is 2.0.0-beta.28 of 26 March 2026, 191 days before this check. PyPI's 2.0.0b29 .dev builds of 24 June and 2 August are automatic builds of master, which we don't count (0). No tagged release in the last 90 days (0). 12 commits on master since 1 April. A maintainer last authored commits on 24 and 25 June and merged two contributor pull requests on 2 August, one fixing #1374 within three weeks, and two July reports got a `fix` label, but we saw no maintainer reply on the open bug reports (8 of 25). Not an MCP server and no official SDK, and the stable PyPI release and the `latest` image trail master by 14 months (5 of 15). Dependencies were bumped on 24 June 2026 and test CI passes, but no release carries the bump, and what pip installs dates from July 2025 (6 of 10).
- PrivateGPT (41): The last release is 1.0.1, dated 16 June 2026 in the changelog and tagged 18 June, 141 days before the check (10 of 30). No release or dated changelog entry in the 90 days since 8 August (0 of 20). Maintainers commit most days and outside pull requests merged in October, but 23 pull requests are open and the stale bot closes issues, including two security reports, with no maintainer reply (13 of 25). Homebrew tap, wheel index and Docker images ship with releases, and Anthropic SDKs work against it. No product MCP server of its own, though it connects to remote MCP servers (10 of 15). Dependabot, uv.lock, actions pinned by commit since 19 October and dependency CVE upgrades in June, July and August (8 of 10). 10 + 0 + 13 + 10 + 8 = 41.

### Agent ergonomics: PrivateGPT +18

- Khoj (46): Graded on the HTTP API. `/api/search` returns `n` results (default 5) with a `max_distance` cut-off and deduplication, and chat takes `n` (default 7) and `d` for references and can stream, but chat answers have no length control and nothing selects fields (14 of 25). Search filters by content type, and the query syntax filters by file, date and word, with no offset for paging search results (12 of 20). Errors are FastAPI `detail` strings with status codes and no documented list. Some name the fix ("Contact the server administrator to add a chat model"), others are chatty quota messages, and a database failure during sign-in answers 503 asking the caller to report it on GitHub, Discord or by email (8 of 20). GET search is safe to repeat, chat POSTs append to a conversation, and there are no idempotency keys or retry guidance (5 of 20). Only `q` is required for search and chat, but there's no official SDK, only the web, desktop, Obsidian and Emacs clients (7 of 15).
- PrivateGPT (64): Read for an HTTP API an agent calls on a local instance. Token counting, `top_k` style retrieval settings, citation output and response byte caps let a caller size context (18 of 25). Artifact listing by namespace and retrieval filters, with no documented cursor pagination (12 of 20). FastAPI validation errors name the field and the validate route checks a request before running it, but there is no error catalogue (12 of 20). Async messages and ingestion return task ids with status, cancel and delete routes. No idempotency keys were found (10 of 20). Anthropic SDKs and Claude Code work by pointing `ANTHROPIC_BASE_URL` at the server, but a model server and an embedding server have to be configured first (12 of 15). 18 + 12 + 12 + 10 + 12 = 64.

### Reliability: PrivateGPT +5

- Khoj (65): Read with the local-software lines, as the Goose and Aider calibration dossiers do. `khoj` is on PyPI for Python 3.10 to 3.12 with images on ghcr.io, but both documented installs land on 1.42.10 of 15 July 2025. `pip install 'khoj[local]'` takes the newest stable release and the setup docs never mention `--pre`, and the dockerize workflow moves the `latest` image tag the Compose file pulls only on X.Y.Z version tags, while every build since is a 2.0.0 pre-release (14 of 20). The test workflow runs pytest against Postgres on Python 3.10, 3.11 and 3.12, and the master runs we saw passed, the last on 2 August 2026 (25). 99 open issues on 3 October, the newest from 24 July, among them an Emacs client crash (#1378), Windows PDF indexing (#1368) and a GPT 5.6 temperature error (#1377). Two July reports carry a `fix` label, and we saw no maintainer reply on them (12 of 25). Dated GitHub release notes for each 2.0 beta with no breaking-change sections, while the betas dropped in-process GGUF chat models (gone by 2.0.0-beta.13) and Stability AI images (2.0.0-beta.21) (6 of 15). 1.42.10 is a stable 1.x release and PyPI says Production/Stable, but all work since July 2025 has shipped as 2.0.0 betas (8 of 15).
- PrivateGPT (70): Read with the local-software lines, since PrivateGPT runs on the owner's hardware with no hosted service behind it. Homebrew tap, `uv tool install` from Zylon's own wheel index (not PyPI) and Docker Hub images `zylonai/private-gpt` 1.0.1 of 18 June 2026. Python 3.11 only, stated in pyproject.toml, and it needs a separate OpenAI-compatible model server (17 of 20). tests.yml runs format, lint, typecheck and the tests affected by each push on main, with the full suite of 217 test files on release pull requests. We couldn't see run results because the GitHub API refused us, and issue #2441 of 1 November reports the Claude spec update workflow failing (15 of 25). GitHub shows 3 open issues of about 1,250, because a stale bot closes quiet issues, two security reports among them, with no maintainer reply (12 of 25). release-please keeps a changelog with breaking changes marked, but no release has been cut since 1.0.1 while main carries 51 commits since 8 August, among them a breaking observability change of 23 October (11 of 15). Version 1.0.1 (15). 17 + 15 + 12 + 11 + 15 = 70.

## Score by category

| Category | Weight | Khoj | PrivateGPT | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 65 | 70 | PrivateGPT +5 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 34 | 83 | PrivateGPT +49 |
| Agent ergonomics | 13% (16.2 this run) | 46 | 64 | PrivateGPT +18 |
| Security & auth | 14% (17.5 this run) | 29 | 32 | PrivateGPT +3 |
| Payments & pricing | 10% (12.5 this run) | 60 | 60 | even |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% (8.8 this run) | 19 | 41 | PrivateGPT +22 |
| Transparency & trust | 7% (8.8 this run) | 63 | 64 | PrivateGPT +1 |
| Negative events | ≤15 | -7 | -7 | |
| **Total** | | **38.8 · E** | **53.2 · D** | |

## Facts side by side

| Fact | Khoj | PrivateGPT |
| --- | --- | --- |
| Kind | Platform | HTTP API |
| Vendor | Khoj Inc. | Zylon (PriBAI Technology Spain S.L.) |
| Hosted endpoint | no (local only) | no (local only) |
| Transports | HTTP | HTTP |
| Auth | OAuth or key | None |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | AGPL-3.0-or-later | Apache-2.0 |
| Read-only variant documented | no | no |
| llms.txt | no | yes |
| Last release | 2026-03-26 | 2026-06-18 |
| Terms last updated | 2024-06-05 | no date given |
| Privacy policy last updated | no date given | no document linked |
| Customer content may train models | not found in the text | not found in the text |
| Terms restrict automated access | not found in the text | not found in the text |
| Terms restrict benchmarking | not found in the text | not found in the text |
| Terms or service can change without notice | not found in the text | not found in the text |
| Arbitration or class-action waiver | not found in the text | not found in the text |
| Popularity | 38k stars | 58k stars |
| Agent reviews | 1/5 (2) | none |

## How the scores have moved

### Khoj

- +0.3 on 27 October 2026: checklist
- -0.3 on 8 October 2026: checklist

### PrivateGPT

No score change since it was listed.

## Verdicts

**Khoj.** AGPL-3.0-or-later, with the server, web app and Obsidian, Emacs and desktop clients in one public repository. No tagged release since 2.0.0-beta.28 on 26 March 2026 and no commit since 2 August.

**PrivateGPT.** PrivateGPT 1.0 is an Apache-2.0 server that gives local models an Anthropic-style messages API with retrieval, citations, tools and MCP, documented by an OpenAPI file and llms.txt. A default start has authentication off, listens on every interface and reads local paths given as URIs, and a public report of that was closed without a reply.

## Before you call either

### Khoj

1. Install with `pip install --pre khoj` or a 2.0.0-beta image tag. Plain `pip install khoj` and `latest` give 1.42.10 from July 2025
2. Point the Obsidian, Emacs or desktop client at your own server. They default to app.khoj.dev, which shut down on 15 April 2026
3. Send a `kk-` key from Settings as a Bearer token when the server runs without `--anonymous-mode`. In anonymous mode /auth isn't mounted and no key exists
4. Call `GET /api/search?q=...&n=5` for passages and put `file:"notes.md"` or `dt>="2026-01-01"` inside `q` to filter. No route is documented
5. Set `KHOJ_TELEMETRY_DISABLE=True` before the first start. Tagged releases send the caller's IP with telemetry

### PrivateGPT

1. Turn on `server.auth` and bind to 127.0.0.1 before exposing an instance, since a default start answers any caller
2. Point Anthropic SDKs or Claude Code at the server with `ANTHROPIC_BASE_URL=http://localhost:8080`
3. Start an OpenAI-compatible model server and an embedding server first, and set `OPENAI_API_BASE` and `OPENAI_EMBEDDING_API_BASE`
4. Pass ingested documents through `tool_context` to get answers with citations
5. Treat web fetch, search and MCP results as untrusted, since PrivateGPT documents no prompt-injection handling

## Questions

### Which is better for AI agents, Khoj or PrivateGPT?

PrivateGPT scores 53.2 (D) on agent readiness against Khoj's 38.8 (E), and leads in 6 of 7 scored categories.

### Can an agent call Khoj and PrivateGPT without installing anything?

No hosted endpoint is listed for Khoj. No hosted endpoint is listed for PrivateGPT.

### Are Khoj and PrivateGPT open source?

Yes. Khoj is open source (AGPL-3.0-or-later). PrivateGPT is open source (Apache-2.0).


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/khoj-vs-privategpt.json, and with the fewest tokens: https://www.anchorterminal.com/compare/khoj-vs-privategpt.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "khoj", "b": "privategpt"}`. From a terminal: `anchor compare khoj privategpt`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/khoj.json and https://www.anchorterminal.com/api/v1/tools/privategpt.json

## Other comparisons with Khoj or PrivateGPT

- [AnythingLLM vs Khoj](https://www.anchorterminal.com/compare/anythingllm-vs-khoj.md)
- [AnythingLLM vs PrivateGPT](https://www.anchorterminal.com/compare/anythingllm-vs-privategpt.md)
- [Berth vs Khoj](https://www.anchorterminal.com/compare/berth-vs-khoj.md)
- [Berth vs PrivateGPT](https://www.anchorterminal.com/compare/berth-vs-privategpt.md)
- [BitRun vs Khoj](https://www.anchorterminal.com/compare/bitrun-vs-khoj.md)
- [BitRun vs PrivateGPT](https://www.anchorterminal.com/compare/bitrun-vs-privategpt.md)
- [Docker Model Runner vs Khoj](https://www.anchorterminal.com/compare/docker-model-runner-vs-khoj.md)
- [Docker Model Runner vs PrivateGPT](https://www.anchorterminal.com/compare/docker-model-runner-vs-privategpt.md)
- [Foundry Local vs Khoj](https://www.anchorterminal.com/compare/foundry-local-vs-khoj.md)
- [Foundry Local vs PrivateGPT](https://www.anchorterminal.com/compare/foundry-local-vs-privategpt.md)
- [Core vs Khoj](https://www.anchorterminal.com/compare/ghost-core-vs-khoj.md)
- [Core vs PrivateGPT](https://www.anchorterminal.com/compare/ghost-core-vs-privategpt.md)
- [GPT4All vs Khoj](https://www.anchorterminal.com/compare/gpt4all-vs-khoj.md)
- [GPT4All vs PrivateGPT](https://www.anchorterminal.com/compare/gpt4all-vs-privategpt.md)
- [HyperQwen vs Khoj](https://www.anchorterminal.com/compare/hyperqwen-vs-khoj.md)
- [HyperQwen vs PrivateGPT](https://www.anchorterminal.com/compare/hyperqwen-vs-privategpt.md)
- [Jan vs Khoj](https://www.anchorterminal.com/compare/jan-vs-khoj.md)
- [Jan vs PrivateGPT](https://www.anchorterminal.com/compare/jan-vs-privategpt.md)
- [Khoj vs KoboldCpp](https://www.anchorterminal.com/compare/khoj-vs-koboldcpp.md)
- [Khoj vs Lemonade](https://www.anchorterminal.com/compare/khoj-vs-lemonade.md)
- [Khoj vs llama.cpp](https://www.anchorterminal.com/compare/khoj-vs-llama-cpp.md)
- [Khoj vs LM Studio](https://www.anchorterminal.com/compare/khoj-vs-lm-studio.md)
- [Khoj vs LocalAI](https://www.anchorterminal.com/compare/khoj-vs-localai.md)
- [Khoj vs MLX LM](https://www.anchorterminal.com/compare/khoj-vs-mlx-lm.md)
- [Khoj vs Ollama](https://www.anchorterminal.com/compare/khoj-vs-ollama.md)
- [Khoj vs Open WebUI](https://www.anchorterminal.com/compare/khoj-vs-open-webui.md)
- [Khoj vs TextGen](https://www.anchorterminal.com/compare/khoj-vs-text-generation-webui.md)
- [Khoj vs vLLM](https://www.anchorterminal.com/compare/khoj-vs-vllm.md)
- [KoboldCpp vs PrivateGPT](https://www.anchorterminal.com/compare/koboldcpp-vs-privategpt.md)
- [Lemonade vs PrivateGPT](https://www.anchorterminal.com/compare/lemonade-vs-privategpt.md)
- [llama.cpp vs PrivateGPT](https://www.anchorterminal.com/compare/llama-cpp-vs-privategpt.md)
- [LM Studio vs PrivateGPT](https://www.anchorterminal.com/compare/lm-studio-vs-privategpt.md)
- [LocalAI vs PrivateGPT](https://www.anchorterminal.com/compare/localai-vs-privategpt.md)
- [MLX LM vs PrivateGPT](https://www.anchorterminal.com/compare/mlx-lm-vs-privategpt.md)
- [Ollama vs PrivateGPT](https://www.anchorterminal.com/compare/ollama-vs-privategpt.md)
- [Open WebUI vs PrivateGPT](https://www.anchorterminal.com/compare/open-webui-vs-privategpt.md)
- [PrivateGPT vs screenpipe](https://www.anchorterminal.com/compare/privategpt-vs-screenpipe.md)
- [PrivateGPT vs TextGen](https://www.anchorterminal.com/compare/privategpt-vs-text-generation-webui.md)
- [PrivateGPT vs vLLM](https://www.anchorterminal.com/compare/privategpt-vs-vllm.md)
- [AI Memory vs Khoj](https://www.anchorterminal.com/compare/ai-memory-vs-khoj.md)
- [Context Mode Engine vs Khoj](https://www.anchorterminal.com/compare/context-mode-vs-khoj.md)
- [Graphicle vs Khoj](https://www.anchorterminal.com/compare/graphicle-vs-khoj.md)
- [Khoj vs LocalGhost](https://www.anchorterminal.com/compare/khoj-vs-localghost.md)
- [Khoj vs screenpipe](https://www.anchorterminal.com/compare/khoj-vs-screenpipe.md)
- [LocalGhost vs PrivateGPT](https://www.anchorterminal.com/compare/localghost-vs-privategpt.md)

## Disclosure

- Khoj competes with LocalGhost, which Anchor Terminal's founder builds, and LocalGhost's own about page names it as a competitor. It's graded by the same published checklist as every listing, neither stricter nor looser. Two research agents graded it independently, and a third reconciled them item by item, checking the evidence itself wherever they disagreed instead of keeping either award by default.

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
