# Repository Briefing: zylon-ai/private-gpt
> Source: https://repoforai.com/repo/zylon-ai/private-gpt (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/zylon-ai/private-gpt
- **Official Docs / Website**: https://www.zylon.ai/private-gpt
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A+ (92/100 · Maintenance 35/35 · Adoption 23/25 · Releases 14/20 · License 20/20)
- **Latest Release**: v1.0.1 (2026-06-18) — https://github.com/zylon-ai/private-gpt/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, Self-Hosted, API
- **Momentum**: 57,668 ★ total (+0 24h / +14 7d) · 7,628 forks
- **Topics**: `ai`, `ai-tools`, `on-premise`
- **When to Use**: Best for: Teams building internal knowledge assistants or domain workflows that need cited retrieval, database or CSV tools, and the freedom to select their own inference backend. Skip if: You need a model server, a turnkey employee-facing search product, or built-in organizational identity and compliance controls without adding infrastructure.

## Overview
```text
### Architecture & Core Mechanics
PrivateGPT sits between an application and its model servers. The client faces an Anthropic-style Messages API, while `OPENAI_API_BASE` points to an OpenAI-compatible inference server exposing `/v1/chat/completions` and `/v1/models`. PrivateGPT orchestrates retrieval and tool use rather than loading model weights. Document ingestion and embeddings feed retrieval, which supplies context for generation and returns source citations. The quickstart configures embeddings through a separate `OPENAI_EMBEDDING_API_BASE` setting.

The Python 3.11 service uses FastAPI, Injector and PyYAML for dependency wiring and configuration, and LlamaIndex Core as its core framework. ARQ is listed as a dependency, but that does not establish the worker or queue topology required for a given deployment. The `private-gpt` CLI resolves to `private_gpt.cli.main:main`. Custom tools and remote MCP extend the application layer; `/ui` is a workbench for exercising that API, not the primary product surface.

### Key Capabilities & Differentiators
The Messages API supports model selection, streaming, asynchronous processing, and token counting. The knowledge layer accepts files and artifacts, including PDFs, and combines embeddings with cited retrieval and agentic RAG. The workbench lets developers select a model from `/v1/models`, upload documents, enable tools per chat, and inspect API requests and responses. Those workflows make it useful for checking citations and integration behavior before building a client.

Built-in tools cover web search, web fetch, and code execution. PrivateGPT also exposes database querying and CSV/tabular analysis without requiring clients to implement those features from scratch. Custom tools and remote MCP servers extend that surface, while skills support is basic. Ollama, llama.cpp, and vLLM are examples of inference backends; validate the specific model and server combination because vision is model-dependent and structured output is inference-dependent. Prompt caching and OAuth/organizations are not supported.

### Trade-offs & Limitations
PrivateGPT complements Ollama, LM Studio, or vLLM rather than replacing them. The separation lets teams change inference servers independently of the application, but they must validate backend behavior and operate both layers. Onyx and Open WebUI are better starting points when the deliverable is a ready-to-use chat or search product. PrivateGPT’s workbench is useful for pilots and debugging, but API consumers should plan to own the production user experience.

Token authentication is available, but OAuth and organizations are not. Zylon is the broader platform built around this layer, with managed deployment, RBAC, and SIEM audit logs; do not assume those controls come with the open-source package. Self-hosting keeps selected services under your control, but web tools and remote MCP can introduce outbound data paths. Set explicit boundaries for those tools, code execution, and database access. Apache-2.0 permits commercial use subject to its terms; model weights and dependencies require their own license review.

### Hardware & Deployment Guide
For a first run, start an OpenAI-compatible model server and make the embedding endpoint reachable. Install `private-gpt[core]` with `uv tool install --python 3.11`, or use the Homebrew package on macOS. Set `OPENAI_API_BASE` and `OPENAI_EMBEDDING_API_BASE`, then run `private-gpt serve`. The quickstart uses port 8080 for the API and `/ui` for the workbench. In Docker, ensure the service can reach both upstream endpoints from inside the container rather than assuming the host’s `localhost` will work.

The Dockerfile defaults to `EXTRAS=core` and pins the uv and Python 3.11.10 slim Bookworm images by digest; it also accepts a Debian snapshot timestamp. The package installation path supports pinned, offline installs, but offline operation also requires staging models and dependencies and reviewing networked tools. Profile ingestion and retrieval on the API host separately from inference load, which varies with model choice, context length, and concurrency. v1.0.0 broadened the original document-RAG project into an application API; v1.0.1 fixed missing Docker database dependencies and publisher readiness.
```

## Key Capabilities
```text
- Protocol boundary: Anthropic-style application API backed by a separate OpenAI-compatible inference server.
- Knowledge pipeline: Document and PDF ingestion, embeddings, and retrieval that returns source citations.
- Tooling: Built-in web search, fetch, and code execution alongside custom tools, remote MCP, and basic skills support.
- Structured data: Built-in database querying and CSV analysis; structured model output remains inference-dependent.
- Workbench: `/ui` exposes model selection, cited retrieval testing, and request/response inspection through the API Debugger.
- Packaging: Python 3.11 CLI, `uv.lock`, and a Dockerfile with digest-pinned base images and `EXTRAS=core` by default.
```

## Quick Start / Clone
```bash
# macOS
brew tap zylon-ai/tap
brew install private-gpt
```
