zylon-ai/private-gpt
Self-hosted API for cited document RAG and tool use on local models
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & 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.
/ui exposes model selection, cited retrieval testing, and request/response inspection through the API Debugger.uv.lock, and a Dockerfile with digest-pinned base images and EXTRAS=core by default.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.
You need a model server, a turnkey employee-facing search product, or built-in organizational identity and compliance controls without adding infrastructure.
Quick Start & Installation
# macOS
brew tap zylon-ai/tap
brew install private-gptComparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| private-gpt ★ | 57.7k | +14 | Python | Apache-2.0 | Self-hosted API for cited document RAG and tool use on local models |
| ragflow | 95.1k | +297 | Go | Apache-2.0 | Go-based RAG platform for parsing complex documents and grounding answers in sou |
| serviette | 58.6k | +11 | Python | MIT | Self-hosted RAG with a separate indexer that keeps document answers current |
| WeKnora | 38.8k | +387 | Go | — | Self-hosted RAG, agents, and a Wiki on shared document knowledge bases |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/zylon-ai/private-gpt.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about private-gpt
Which API does my application call, and where does inference run?
OPENAI_API_BASE, using /v1/chat/completions and /v1/models. The quickstart configures embeddings through OPENAI_EMBEDDING_API_BASE. Test tool calls, streaming, and structured output with the exact backend and model you plan to use; endpoint compatibility alone does not establish feature parity.How should I size GPU memory and application-server resources?
Can we use it commercially in a regulated self-hosted environment?
When should I pick PrivateGPT over Ollama, Onyx, or Open WebUI?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy