Chat UI: The Open Source Interface for LLMs, Powering HuggingChat
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Chat UI is an open-source SvelteKit application that provides a flexible chat interface for Large Language Models (LLMs). It serves as the foundation for HuggingChat, enabling users to interact with various OpenAI-compatible APIs. This project offers extensive customization and deployment options, making it ideal for developers building their own AI chat experiences.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Chat UI is an impressive open-source project by Hugging Face, serving as the foundational codebase for the popular HuggingChat application. Built with SvelteKit and TypeScript, it provides a highly customizable and extensible chat interface designed specifically for interacting with Large Language Models (LLMs). This project empowers developers to create their own AI chat experiences, offering seamless integration with various OpenAI-compatible APIs and robust features for managing chat history, users, and settings.
Installation
Getting Chat UI up and running locally is straightforward. The project is designed to connect with OpenAI-compatible APIs, making it flexible for various LLM providers.
Step 1: Clone the repository and set up your environment variables.
First, clone the repository and navigate into its directory:
git clone https://github.com/huggingface/chat-ui
cd chat-ui
Next, create a .env.local file in the root of the project. This file will hold your API endpoint and key. For quick setup, you can use Hugging Face Inference Providers router:
OPENAI_BASE_URL=https://router.huggingface.co/v1
OPENAI_API_KEY=hf_************************ # Replace with your Hugging Face access token
Step 2: Install dependencies and launch the development server.
npm install
npm run dev -- --open
This will start the development server, and Chat UI will be accessible in your browser, ready for you to start chatting.
Examples
Chat UI offers versatile integration options for various LLM providers and robust database solutions.
Connecting to Different LLM Providers:
The OPENAI_BASE_URL and OPENAI_API_KEY in your .env.local file can be configured to work with a range of OpenAI-compatible services:
| Provider | Example OPENAI_BASE_URL |
Example key env |
|---|---|---|
| Hugging Face Inference Providers router | https://router.huggingface.co/v1 |
OPENAI_API_KEY=hf_xxx (or HF_TOKEN legacy alias) |
| llama.cpp server | http://127.0.0.1:8080/v1 |
OPENAI_API_KEY=sk-local-demo (any string works; llama.cpp ignores it) |
| Ollama | http://127.0.0.1:11434/v1 |
OPENAI_API_KEY=ollama |
| OpenRouter | https://openrouter.ai/api/v1 |
OPENAI_API_KEY=sk-or-v1-... |
| Poe | https://api.poe.com/v1 |
OPENAI_API_KEY=pk_... |
Database Options:
For chat history, user data, and settings, Chat UI uses MongoDB. For local development, it can fall back to an embedded MongoDB. For production or team environments, you can configure it with:
- MongoDB Atlas (managed): Set
MONGODB_URLto your Atlas connection string. - Local MongoDB (container): Run
docker run -d -p 27017:27017 --name mongo-chatui mongo:latestand setMONGODB_URL=mongodb://localhost:27017.
Advanced Features:
Chat UI also supports advanced configurations like:
- Theming: Customize the app's name, assets, and data sharing options using environment variables.
- LLM Router: Implement server-side smart routing for LLMs using models like
katanemo/Arch-Router-1.5B, allowing the UI to select the best model for each message. - MCP Tools (Model Context Protocol): Integrate external tools and services, enabling models to perform actions like web searches and feed results back into the conversation using OpenAI function calling.
Why Use Chat UI?
Chat UI stands out as a robust and flexible solution for anyone looking to build or customize an AI chat application. Its key advantages include:
- Open Source and Community-Driven: Being open source, it benefits from community contributions and offers full transparency and control.
- Proven Reliability: It powers HuggingChat, demonstrating its stability and capability in a real-world, high-traffic environment.
- Broad LLM Compatibility: Its support for OpenAI-compatible APIs means you can easily integrate with a wide array of LLM providers, from commercial services to local models.
- Developer-Friendly: Built with SvelteKit and TypeScript, it offers a modern development experience, with clear installation steps and comprehensive documentation.
- Rich Feature Set: From basic chat functionality to advanced LLM routing, tool integration, and theming, Chat UI provides a comprehensive toolkit for sophisticated AI chat applications.
Links
- GitHub Repository: https://github.com/huggingface/chat-ui
- HuggingChat Application: https://huggingface.co/chat
Source repository
Open the original repository on GitHub.
16 counted GitHub visits
Related repositories
Similar repositories that may be relevant next.

CCCC: Coordinate Your Coding Agents Like a Group Chat
September 29, 2026
CCCC is a production-minded orchestrator designed to coordinate coding agents like a group chat, offering features such as read receipts, delivery tracking, and remote operations from your phone. It enables 24/7 workflow for multi-agent teams with a single `pip install` and zero infrastructure. This tool helps manage diverse AI runtimes, ensuring persistent collaboration across different machines and trusted working groups.

tunnel-client: Securely Connect Private MCP Servers to OpenAI Services
September 2, 2026
The `tunnel-client` is an OpenAI-developed client that enables secure connections between private or localhost Model Context Protocol (MCP) servers and OpenAI services like ChatGPT, Codex, and AgentKit. It allows developers to integrate their internal MCP servers without exposing them to the public internet, ensuring enhanced security and operational control. This tool is ideal for scenarios requiring secure access from private networks to OpenAI's powerful AI models.

AnythingMCP: AI-Empowered Gateway for Custom Claude, ChatGPT, Gemini Connectors
August 16, 2026
AnythingMCP is a self-hosted, open-source AI-empowered gateway that transforms existing APIs, databases, and MCP servers into custom connectors for leading AI models like Claude, ChatGPT, and Gemini. It enables no-code integration of REST, SOAP, GraphQL, and SQL sources into the Model Context Protocol, featuring robust authentication, access control, and audit logging. The platform also includes over 175 pre-built adapters for common services, simplifying complex integrations.

Jan: An Open-Source, Offline ChatGPT Alternative for Your Desktop
August 14, 2026
Jan is a powerful open-source desktop application that provides a 100% offline alternative to ChatGPT. It allows users to download and run various large language models locally, ensuring complete control and privacy over their AI interactions. With support for multiple platforms, Jan offers a robust solution for personal and private AI use.