Main features
- Works with any OpenAI-compatible endpoint, models discovered automatically
- Image input for vision-capable models
- MCP tool calling, with servers preset by the admin or added by users
- Omni router that picks a model per message
- Optional speech-to-text through a transcription model
- Conversation sharing and data export
- OpenID Connect login with email or domain allow lists
- Usage limits, admin API and optional Prometheus metrics
- Custom app name, theme and assets
- Single Docker image with MongoDB bundled
What Chat UI does
Chat UI is the open source chat application Hugging Face uses for HuggingChat at huggingface.co/chat. It is a SvelteKit web app with conversation history, image input for vision models, shareable conversations, data export and an optional login. Because the public service runs on it, the repository also publishes HuggingChat’s production Helm configuration, which shows how the code is deployed at scale.
The current main branch is a rewrite. It drops the earlier provider-specific integrations, built-in web search, embeddings and GGUF discovery, and keeps a smaller core: an OpenAI-compatible model connection, MCP tools and a router. The previous version remains on a legacy branch.
Tools come through MCP. Administrators can preload servers (HuggingChat ships web search through Exa’s MCP server, for example) and users can add their own. The “Omni” router can choose a model for each message, sending images to a multimodal model and tool requests to a model that supports function calling.
Models and providers
Chat UI speaks one protocol: the OpenAI-compatible API. You set OPENAI_BASE_URL and a key, and it lists models from the endpoint’s /models route. The default is the Hugging Face Inference Providers router, which forwards requests to third-party inference companies. The README documents llama.cpp server and Ollama for local models, plus OpenRouter and Poe.
There is no native Anthropic or Google connector, so Claude or Gemini models need an OpenAI-compatible gateway. The license covers the interface only: whichever endpoint you configure receives the prompts.
Privacy and data
Chat history, users, settings, files and statistics are stored in MongoDB. Without a MONGODB_URL, the app falls back to an embedded MongoDB that writes to a local folder, and the chat-ui-db image bundles MongoDB in the container. Google Analytics and Plausible settings are empty in the default configuration, and Prometheus metrics are off, so a self-hosted instance sends nothing to Hugging Face unless you choose its router or MCP servers.
For HuggingChat, Hugging Face states that conversations are stored so you can return to them and can be deleted, that request and response bodies are not stored when routed to providers, that data is not used for training, and that debug logs are kept for up to 30 days. Each inference provider applies its own policy.
Self-hosting Chat UI
The quickest route is one Docker container (ghcr.io/huggingface/chat-ui-db) with a volume for data. A second image expects an external MongoDB 6 or 7, and the app can also be built with npm. A Helm chart sits in the repository but is labeled unstable and is installed from the cloned folder.
Without OpenID settings anyone who reaches the instance can chat. With OpenID Connect (Hugging Face by default, or Google and others) you can restrict access to listed email addresses or domains and set usage limits.
Hosted version
HuggingChat at huggingface.co/chat is the hosted version and requires a Hugging Face account.
Limitations
The rewrite made Chat UI simpler but narrower. It has no document chat, no built-in web search outside MCP, and image uploads are the only documented file input. Administration is limited to OpenID login and allow lists, with no roles screen, LDAP or SAML. Local models require a separately running server.
Who it suits
Chat UI fits people and teams who already have an OpenAI-compatible endpoint, such as a llama.cpp or Ollama server or Hugging Face’s router, and want a clean multi-user front end in one container. Organizations needing richer access control or document search should compare LibreChat and AnythingLLM in the AI chat guide.
Technical details
Self-hosting needs
- MongoDB
Built with
- TypeScript
- SvelteKit
- Svelte
GitHub topics
- chatgpt
- hacktoberfest
- huggingface
- llm
- svelte
- svelte-kit
- sveltekit
- tailwindcss
- typescript
Reviewed by the OpenSourcePicks editors from the project's repository and documentation. Something out of date? Tell us.