private-gpt Documentation

Complete API layer for private AI applications on local models: RAG, skills, tools, MCP, text-to-sql, and more. Works with any OpenAI-compatible inference...

57,433 stars Python Python 1 file ยท ~2,615 tokens #ai#ai-tools#on-premise
RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy private-gpt on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name private-gpt -p 8080:8080 --restart always zylon-ai/private-gpt:latest

Running a model locally is only the first step. To build useful AI applications you need a set of higher-level building blocks. PrivateGPT provides that layer as an open-source API following the Claude API model โ€” so you can build private AI products without rebuilding the same backend primitives from scratch, and without depending on cloud APIs.

Production-tested: PrivateGPT powers Zylon, the on-premise AI platform providing Private AI to enterprises across the globe.

text
Your app / agent / workflow / UI
              |
        PrivateGPT API
              |
OpenAI-compatible inference server (Ollama, llama.cpp, vLLM, โ€ฆ)

PrivateGPT does not run models itself. It connects to any OpenAI-compatible inference server via OPENAI_API_BASE. If it implements /v1/chat/completions and /v1/models, it works.

PrivateGPT ships a built-in workbench UI for testing and demos, available at /ui. The API is the actual product.


What PrivateGPT gives you

  • Standard messages API (streaming, async, token counting)
  • File and artifact ingestion
  • Retrieval with citations and agentic RAG
  • Built-in tools mirroring the Claude API (web search, web fetch, code execution)
  • Custom tools and MCP connectors
  • Structured access to databases and CSVs
  • Embeddings and orchestration

Quickstart

For Docker, full installation options, and model configuration see the full Quickstart guide.

Prerequisites: You need a running OpenAI-compatible LLM server. Ollama is the easiest starting point.

1. Install PrivateGPT

bash
# macOS
brew tap zylon-ai/tap
brew install private-gpt
bash
# Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

uv tool install --python 3.11 \
  --find-links https://wheels.privategpt.dev/packages/ \
  "private-gpt[core]"
powershell
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

uv tool install --python 3.11 `
  --find-links https://wheels.privategpt.dev/packages/ `
  "private-gpt[core]"

2. Start your LLM server

bash
# Example with Ollama
ollama pull qwen3.5:35b         # LLM (~24 GB)
ollama pull mxbai-embed-large   # Embeddings (~670 MB)
ollama serve

3. Run PrivateGPT

bash
# macOS / Linux
OPENAI_API_BASE=http://localhost:<llm-port>/v1 \
  OPENAI_EMBEDDING_API_BASE=http://localhost:/v1 \
  private-gpt serve
powershell
# Windows (PowerShell)
$env:OPENAI_API_BASE = "http://localhost:<llm-port>/v1"
$env:OPENAI_EMBEDDING_API_BASE = "http://localhost:/v1"
private-gpt serve

4. Open the UI

Go to http://localhost:8080/ui. The API is at http://localhost:8080 and follows the Anthropic API spec.

The UI is useful for:

  • Sending messages.
  • Selecting models from /v1/models.
  • Uploading documents.
  • Testing retrieval with citations.
  • Enabling tools per chat.
  • Configuring databases, MCP connectors, skills, and custom tools.
  • Inspecting requests and responses through the API Debugger.

This UI is a demonstrator, not the core product. Developers are expected to build their own applications on top of the API. That said, the UI is intentionally polished enough for demos, videos, internal pilots, and quick local usage.


Integrations

Claude Desktop / Cowork Microsoft Excel Claude add-in Microsoft Word Claude add-in
n8n OpenCode PrivateGPT Workbench

PrivateGPT works natively as the local backend for the tools developers and end users already use.

Integration Guide What it enables
Claude Code Use your local models as the backend for agentic coding in the terminal
Claude Desktop / Cowork Connect the Claude desktop app and Cowork to your private models
Claude for Microsoft 365 Run private AI inside Word, Excel, Outlook, and PowerPoint
OpenCode Local AI coding assistant in the terminal

Any tool that works with a local OpenAI-compatible provider will also work with PrivateGPT. The list below is non-exhaustive.

Tool Link
n8n n8n.io
OpenClaw openclaw.ai
Hermes Agent hermes-agent.dev
VS Code code.visualstudio.com
Cline cline.bot

Claude API compatibility

PrivateGPT follows the Claude API as the reference for modern AI application APIs. The goal is full coverage where it makes sense for a local, open-source layer.

Area Capability Claude API PrivateGPT
Models Model selection โœ… โœ…
Messages Messages API โœ… โœ…
Messages Streaming โœ… โœ…
Messages Batch / async processing โœ… โœ… async
Messages Token counting โœ… โœ…
Knowledge Files / artifacts โœ… โœ…
Knowledge PDF and document ingestion โœ… โœ…
Knowledge Retrieval with citations โœ… โœ…
Knowledge Embeddings โœ… โœ…
Tools Tool use โœ… โœ…
Tools Tools in streaming โœ… โœ…
Tools Built-in web search โœ… โœ…
Tools Web extraction / fetch โœ… โœ…
Tools Custom tools โœ… โœ…
Data Database querying Via tools โœ… built-in
Data CSV / tabular analysis Via tools / code โœ… built-in
Agents MCP in the API โœ… โœ…
Agents Remote MCP servers โœ… โœ…
Agents Skills โœ… โš™๏ธ basic
Output Structured outputs โœ… โœ… inference-dependent
Models Vision โœ… โœ… model-dependent
Optimization Prompt caching โœ… โŒ
Reasoning Extended thinking โœ… โœ…
Platform Token-based auth โœ… โœ…
Platform OAuth / organizations โœ… โŒ

โœ… Supported ยท โš™๏ธ Partial / in progress ยท โŒ Not supported

Contributions are especially welcome in โš™๏ธ areas.


Why PrivateGPT? A brief history

PrivateGPT started as a proof of concept in 2023: a script that let you chat with your documents, fully offline, with no data leaving your machine. It went viral on GitHub, crossed 50K stars, and became one of the most-watched AI repos of that year.

That early version made one thing clear: there was serious demand for private, local AI that worked without cloud dependencies.

PrivateGPT 1.0 is the evolution of that idea โ€” rebuilt from the ground up as a proper API layer for private AI applications.


How PrivateGPT compares

vs Ollama, LM Studio, LocalAI, vLLM, llama.cpp

These projects make it possible to run and serve models locally. They answer: how do I run a model?

PrivateGPT answers the next question: how do I build a useful AI application on top of that model?

text
Ollama / LM Studio / LocalAI / vLLM / llama.cpp  =  local inference layer
PrivateGPT                                        =  local AI application API layer

Use them together. Run your model with whichever inference server you prefer, then point PrivateGPT at it.

vs Onyx, Open WebUI

Both are valuable, but they are app-first experiences focused on chat and enterprise search. PrivateGPT is API-first. It provides the standardized local backend underneath those products โ€” not the final product itself.

text
Onyx / Open WebUI  =  self-hosted AI applications
PrivateGPT         =  API layer for building self-hosted AI applications

PrivateGPT vs Zylon

PrivateGPT is maintained by the team at Zylon.

PrivateGPT is the open-source application API layer: messages, ingestion, tools, retrieval, citations, database access, tabular analysis, MCP, skills, and custom tools.

Zylon is the end-to-end AI Infrastructure orchestrating the hardware and software layers into a complete production platform for regulated organizations. On top of PrivateGPT, Zylon adds:

  • Integrated inference server based on NVIDIA Triton + vLLM to run open-weight models.
  • Concurrency, batch processing and load balancing capabilities to operate at scale.
  • Kubernetes self-contained deployment with 20+ production services packaged and supported.
  • CLI for installation, updates, model selection, and platform configuration.
  • API gateway for governance and developer platform.
  • Workspace application for non-technical end users.
  • LDAP/Active Directory integration and RBAC user management.
  • Telemetry, observability and operational monitoring.
  • SIEM audit logs for compliance.
  • SharePoint, Confluence, FTP, and Samba connectors.
  • Disconnected (air-gapped) operation without external cloud dependencies.
  • Integrated n8n Community Edition for workflow automation.

Use PrivateGPT if you want the open-source local AI application layer and developer API.

Use Zylon if you need the full enterprise AI infrastructure around it: deployment, governance, operations, user management, integrations, auditability, and support.

Learn more at zylon.ai ยท Book a demo


Community and contributing

  • Discord โ€” questions, show-and-tell, and release discussions
  • Documentation โ€” full reference, guides, and API docs
  • Issues โ€” bug reports and feature requests
  • Community Forks โ€” interesting forks and derivatives by the community

Pull requests are welcome. If your PR doesn't fit the upstream roadmap, you can add your fork to the Community Forks page instead.