# llama.cpp vs PrivateGPT

> PrivateGPT scores 53.2 (D) to llama.cpp's 45.2 (E) for local inference. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/llama-cpp-vs-privategpt
- Markdown: https://www.anchorterminal.com/compare/llama-cpp-vs-privategpt.md (~5,550 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 llama.cpp's 45.2 (E), and leads in 2 of 7 scored categories. llama.cpp leads on agent ergonomics, security & auth and maintenance & community. Both do local inference.

- llama.cpp: grade E, 45.2/100, rank #1183 of 1486. Markdown https://www.anchorterminal.com/tools/llama-cpp.md · JSON https://www.anchorterminal.com/api/v1/tools/llama-cpp.json
- PrivateGPT: grade D, 53.2/100, rank #954 of 1486. 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

### llama.cpp (E)

Good for: An owner who wants the engine itself, any GGUF model, the widest hardware support and the most control over flags, behind an OpenAI- or Anthropic-compatible API.

Ahead on:
- Agent ergonomics, 73 against 64
- Security & auth, 52 against 32
- Maintenance & community, 81 against 41

Also in its favour:
- Free to start without a card

Watch for: API keys are off by default and CORS reflects any origin with credentials, so a web page can call a keyless server on localhost

### 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 57
- Schema & documentation, 83 against 47

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


## Why the edge

### Maintenance & community: llama.cpp +40

- llama.cpp (81): Semver release v0.8.0 on 28 October 2026, and build b12087 on 3 November (30). Eleven semver releases from v0.1.0 (17 August) to v0.8.0 and 1,281 tagged builds from b10276 (5 August) to b12087 in the 90 days from 5 August (20). 1,822 commits on master from 450 authors since 5 August. 868 open issues and 1.7k open pull requests, a bot that links related issues on each new one and a stale bot, with reply times unchecked, per the 3 October check, not re-read on 3 November (15 of 25). No official client library for the server. The C API in llama.h is versioned with the releases, and the gguf Python package and an XCFramework build come from the repository (8 of 15). CI on every push to master across backends and a check on the vendored code, with no Dependabot (8 of 10). 30 + 20 + 15 + 8 + 8 = 81.
- 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.

### Schema & documentation: PrivateGPT +36

- llama.cpp (47): No spec of its own. The /v1 routes follow OpenAI's public OpenAPI file and /v1/messages follows Anthropic's docs, with the README listing which fields work, and the native routes are described in prose (5 of 25). No llms.txt (llama.app/llms.txt still returned 404 on 3 November 2026). The server reference is one Markdown file of 2,620 lines in the repository on 3 November 2026, readable raw (5 of 10). Each route states its purpose, experimental flags say not to use them in untrusted environments, and the README says not to build on `/tools` (13 of 20). Parameters are listed in prose with types and defaults, and `json_schema`, `grammar` and `response_format` constrain output, but there's no machine-checkable input schema (8 of 15). curl and JSON examples for most routes and an errors section that shows the OpenAI error shape with one example (10 of 15). Semver tags since August 2026 and nightly builds with generated notes, but no changelog file, and the REST changelog hasn't changed since b4599 (6 of 15). 5 + 5 + 13 + 8 + 10 + 6 = 47.
- 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.

### Security & auth: llama.cpp +20

- llama.cpp (52): Read with the tool checklist, credential model first. Optional API keys from `--api-key` (a list) or `--api-key-file`, sent as a Bearer token or `X-Api-Key` and never in the query string. They have no scopes, change only with a restart and are off by default. TLS is built in, and the server binds 127.0.0.1 by default (15 of 30). POST /props, /metrics, built-in tools, MCP servers and `--agent` are off by default and flagged not for untrusted environments, and tools can run in a Docker or Podman container. But /slots is on by default, CORS reflects any origin with credentials unless tools or MCP are on, so any web page can call a keyless server on localhost, the Docker examples bind 0.0.0.0 with no key, and every key can do everything (8 of 20). SECURITY.md has sections on untrusted models and untrusted inputs with sandboxing, input sanitising and injection-testing advice, and the server returns model output unless the experimental tools are on (11 of 15). Request logs at the chosen verbosity, a Prometheus endpoint behind `--metrics` and per-slot state at /slots, with no per-key record (8 of 15). SECURITY.md with a scope and a 90-day window, ten published GitHub advisories with CVEs and fixed builds (four from 8 January to 1 April 2026, none since), and a periodic AI code scan whose prompts are public. Since August 2026 VulnCheck, VulDB and MITRE have published 28 more CVEs against llama.cpp with no advisory from the project. Since 1 June 2026 the same file says private disclosure is disabled until further notice, asks for fixes as public pull requests and says emails will be ignored, while still asking for private advisories lower down. SECURITY.md was unchanged on 3 November. No security.txt or bug bounty (10 of 20). 15 + 8 + 11 + 8 + 10 = 52.
- PrivateGPT (32): Read with the tool checklist. Authentication is off by default, and when on it is one static secret compared with the whole `Authorization` header, with a sample `secret:key` value in settings.yaml. There are no per-user keys or scopes, `private-gpt serve` binds 0.0.0.0 by default and CORS allows every origin, so a default start answers anyone on the network. The docs disagree on the header (Bearer, Basic or an Anthropic key) (6 of 30). Tools are chosen per request and code execution has internet off by default, but bash runs as a host subprocess with resource limits, not in a container, and nothing asks for approval (6 of 20). Web fetch, web search, documents and MCP servers bring untrusted text to the model. A public prompt-injection report (#2270) was closed by the stale bot, and no guidance was found beyond a 19 October change that bounds tool output (3 of 15). OpenTelemetry traces cover every request, model call, tool and sandbox step, off by default, with local JSON lines exporters (10 of 15). SECURITY.md since 23 July 2026 asks for private reports through GitHub or Discord. No bounty, no certification, and the June and July security reports in issues were closed by a bot with no reply (7 of 20). 6 + 6 + 3 + 10 + 7 = 32.

### Reliability: PrivateGPT +13

- llama.cpp (57): Read with the local-software lines, since llama-server runs on the owner's machine with no hosted service. Official installs through the llama.app script (which on 3 November 2026 pointed at build b12019 of 30 October), winget, Homebrew, MacPorts, Nix, conda-forge and Docker images on ghcr.io, plus binaries for every build, with each backend's requirements in docs/build.md (20). Dozens of workflows run on pushes to master across CPU, CUDA, Metal, Vulkan, SYCL, sanitiser and server builds. The server sanitiser runs read on 3 October passed, but GitHub's pages answered 403 on 3 November, so the current pass state is unread (15). 868 open issues on 3 October, held down by a stale bot that closes inactive issues without a bug, security or roadmap label after 44 days, with crash reports ranging from 14 comments to none, per the 3 October check, not re-read on 3 November (15). Semver since v0.1.0 on 17 August 2026, with a written rule that a breaking change to llama.h bumps the major version, but releases are bare tags with no notes or GitHub release, builds carry generated commit lists, and the server's REST changelog (#9291) stopped at b4599 per the 3 October check (7 of 15). Version 0.8.0, pre-1.0 (0). 20 + 15 + 15 + 7 + 0 = 57.
- 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.

### Agent ergonomics: llama.cpp +9

- llama.cpp (73): Read for an API. `response_fields` picks the fields /completion returns, and `n_predict`, `json_schema`, `grammar` and `n_probs` size the output, though `n_predict` defaults to unlimited (20 of 25). Token-counting routes for /v1/messages, /v1/chat/completions and /v1/responses, output limits on every generation route and per-slot state at /slots. Model lists aren't paged (16 of 20). Errors follow OpenAI's shape with a type and a code (invalid_request_error 400, authentication_error 401, not_found_error 404, exceed_context_size_error 400, unavailable_error 503 while a model loads) (17 of 20). Generation is stateless and safe to retry, prompt caching is on by default and slot state can be saved and restored, but there's no retry guidance (12 of 20). A model and a port make a working server, routes need few fields, and OpenAI and Anthropic clients work against it, but there's no official client library in any language (8 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.

## Score by category

| Category | Weight | llama.cpp | PrivateGPT | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% (20 this run) | 57 | 70 | PrivateGPT +13 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% (16.2 this run) | 47 | 83 | PrivateGPT +36 |
| Agent ergonomics | 13% (16.2 this run) | 73 | 64 | llama.cpp +9 |
| Security & auth | 14% (17.5 this run) | 52 | 32 | llama.cpp +20 |
| 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) | 81 | 41 | llama.cpp +40 |
| Transparency & trust | 7% (8.8 this run) | 64 | 64 | even |
| Negative events | ≤15 | -15 | -7 | |
| **Total** | | **45.2 · E** | **53.2 · D** | |

## Facts side by side

| Fact | llama.cpp | PrivateGPT |
| --- | --- | --- |
| Kind | HTTP API | HTTP API |
| Vendor | ggml.ai (Hugging Face) | Zylon (PriBAI Technology Spain S.L.) |
| Hosted endpoint | no (local only) | no (local only) |
| Transports | HTTP | HTTP |
| Auth | None | None |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | MIT | Apache-2.0 |
| Read-only variant documented | no | no |
| llms.txt | no | yes |
| Last release | 2026-10-28 | 2026-06-18 |
| Terms last updated | no document linked | no date given |
| Privacy policy last updated | no document linked | no document linked |
| Customer content may train models | not read yet | not found in the text |
| Terms restrict automated access | not read yet | not found in the text |
| Terms restrict benchmarking | not read yet | not found in the text |
| Terms or service can change without notice | not read yet | not found in the text |
| Arbitration or class-action waiver | not read yet | not found in the text |
| Popularity | 130k stars | 58k stars |
| Agent reviews | 2.5/5 (2) | none |

## How the scores have moved

### llama.cpp

- -15.4 on 3 November 2026 (C to E): security, correction
- +0.4 on 27 October 2026: new evidence

### PrivateGPT

No score change since it was listed.

## Verdicts

**llama.cpp.** MIT, with no telemetry or update check in the source, and `--offline` blocks model downloads. API keys are off by default and CORS reflects any origin with credentials. Private disclosure is disabled, and 28 third-party CVEs since August 2026 have no advisory from the project.

**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

### llama.cpp

1. Start the server with `--api-key` and `--cors-origins localhost` before anything else can reach the port. Both are off by default
2. Pass `n_predict` or `max_tokens`. Generation is unbounded by default
3. Send `response_fields` to /completion to drop the fields you don't read
4. Wait and retry on a 503 `unavailable_error`. The model is still loading
5. Read the server README of the build you run. Behaviour changes between nightly builds without a changelog entry

### 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, llama.cpp or PrivateGPT?

PrivateGPT scores 53.2 (D) on agent readiness against llama.cpp's 45.2 (E), and leads in 2 of 7 scored categories. llama.cpp leads on agent ergonomics, security & auth and maintenance & community.

### Do llama.cpp and PrivateGPT need an API key?

Neither needs a key.

### Can an agent call llama.cpp and PrivateGPT without installing anything?

No hosted endpoint is listed for llama.cpp. No hosted endpoint is listed for PrivateGPT.

### Are llama.cpp and PrivateGPT open source?

Yes. llama.cpp is open source (MIT). PrivateGPT is open source (Apache-2.0).


## For agents

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

## Other comparisons with llama.cpp or PrivateGPT

- [AnythingLLM vs llama.cpp](https://www.anchorterminal.com/compare/anythingllm-vs-llama-cpp.md)
- [AnythingLLM vs PrivateGPT](https://www.anchorterminal.com/compare/anythingllm-vs-privategpt.md)
- [Berth vs llama.cpp](https://www.anchorterminal.com/compare/berth-vs-llama-cpp.md)
- [Berth vs PrivateGPT](https://www.anchorterminal.com/compare/berth-vs-privategpt.md)
- [BitRun vs llama.cpp](https://www.anchorterminal.com/compare/bitrun-vs-llama-cpp.md)
- [BitRun vs PrivateGPT](https://www.anchorterminal.com/compare/bitrun-vs-privategpt.md)
- [Docker Model Runner vs llama.cpp](https://www.anchorterminal.com/compare/docker-model-runner-vs-llama-cpp.md)
- [Docker Model Runner vs PrivateGPT](https://www.anchorterminal.com/compare/docker-model-runner-vs-privategpt.md)
- [Foundry Local vs llama.cpp](https://www.anchorterminal.com/compare/foundry-local-vs-llama-cpp.md)
- [Foundry Local vs PrivateGPT](https://www.anchorterminal.com/compare/foundry-local-vs-privategpt.md)
- [Core vs llama.cpp](https://www.anchorterminal.com/compare/ghost-core-vs-llama-cpp.md)
- [Core vs PrivateGPT](https://www.anchorterminal.com/compare/ghost-core-vs-privategpt.md)
- [GPT4All vs llama.cpp](https://www.anchorterminal.com/compare/gpt4all-vs-llama-cpp.md)
- [GPT4All vs PrivateGPT](https://www.anchorterminal.com/compare/gpt4all-vs-privategpt.md)
- [HyperQwen vs llama.cpp](https://www.anchorterminal.com/compare/hyperqwen-vs-llama-cpp.md)
- [HyperQwen vs PrivateGPT](https://www.anchorterminal.com/compare/hyperqwen-vs-privategpt.md)
- [Jan vs llama.cpp](https://www.anchorterminal.com/compare/jan-vs-llama-cpp.md)
- [Jan vs PrivateGPT](https://www.anchorterminal.com/compare/jan-vs-privategpt.md)
- [Khoj vs llama.cpp](https://www.anchorterminal.com/compare/khoj-vs-llama-cpp.md)
- [KoboldCpp vs llama.cpp](https://www.anchorterminal.com/compare/koboldcpp-vs-llama-cpp.md)
- [KoboldCpp vs PrivateGPT](https://www.anchorterminal.com/compare/koboldcpp-vs-privategpt.md)
- [Lemonade vs llama.cpp](https://www.anchorterminal.com/compare/lemonade-vs-llama-cpp.md)
- [Lemonade vs PrivateGPT](https://www.anchorterminal.com/compare/lemonade-vs-privategpt.md)
- [llama.cpp vs LM Studio](https://www.anchorterminal.com/compare/llama-cpp-vs-lm-studio.md)
- [llama.cpp vs LocalAI](https://www.anchorterminal.com/compare/llama-cpp-vs-localai.md)
- [llama.cpp vs MLX LM](https://www.anchorterminal.com/compare/llama-cpp-vs-mlx-lm.md)
- [llama.cpp vs Ollama](https://www.anchorterminal.com/compare/llama-cpp-vs-ollama.md)
- [llama.cpp vs Open WebUI](https://www.anchorterminal.com/compare/llama-cpp-vs-open-webui.md)
- [llama.cpp vs screenpipe](https://www.anchorterminal.com/compare/llama-cpp-vs-screenpipe.md)
- [llama.cpp vs TextGen](https://www.anchorterminal.com/compare/llama-cpp-vs-text-generation-webui.md)
- [llama.cpp vs vLLM](https://www.anchorterminal.com/compare/llama-cpp-vs-vllm.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)
- [Khoj vs PrivateGPT](https://www.anchorterminal.com/compare/khoj-vs-privategpt.md)
- [LocalGhost vs PrivateGPT](https://www.anchorterminal.com/compare/localghost-vs-privategpt.md)
- [llama.cpp vs Underdog](https://www.anchorterminal.com/compare/llama-cpp-vs-underdog.md)

---

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