LibreChat
Unite every major AI model in one self-hosted chat platform with agents, code execution, MCP tools, and enterprise authentication.
LibreChat is a feature-rich, open-source AI chat platform you run on your own infrastructure, giving you simultaneous access to OpenAI, Anthropic Claude, Google Gemini, Azure OpenAI, AWS Bedrock, DeepSeek, Mistral, Groq, Ollama, and dozens of other providers through a single, unified interface. It eliminates vendor lock-in entirely: swap models mid-conversation, apply presets per provider, and maintain full data sovereignty without routing traffic through any third-party proxy.
Beyond raw multi-model access, LibreChat ships a complete agent platform. The no-code agent builder lets you assemble autonomous assistants from MCP servers, file search, a sandboxed code interpreter, and custom OpenAPI actions, then share them with individuals, groups, or a community marketplace. Every agent runs with its own context window and can spawn focused subagents for parallel, isolated work streams.
The platform is architected for real production deployments. Resumable streams via Redis ensure users never lose a response to a dropped connection, with multi-tab and multi-device sync included. Enterprise authentication covers OAuth2, LDAP, SAML, and two-factor, while built-in token spend tracking, moderation tooling, and per-user credential isolation handle the governance requirements that teams actually need. One-click deployment targets include Docker Compose, Railway, Zeabur, Sealos, and Kubernetes via Helm chart.
With 39,000+ GitHub stars, 310+ contributors, and a release cadence averaging two releases per month, LibreChat is one of the most actively maintained self-hosted AI projects available. The codebase is pure MIT, with no locked enterprise tiers, no feature flags gating capabilities, and no telemetry unless explicitly enabled.
What You Get
- Multi-Model Switching - Connect to OpenAI, Anthropic Claude, Google Gemini, Azure OpenAI, AWS Bedrock, DeepSeek, Mistral, OpenRouter, Groq, Ollama, and any OpenAI-compatible endpoint without proxies, switching models or providers mid-conversation.
- Sandboxed Code Interpreter - Execute Python, Node.js, Go, Java, Rust, C/C++, PHP, and Fortran in a fully isolated environment with direct file upload and download, with no data leaving your infrastructure.
- AI Agents & MCP Tools - Build no-code custom assistants with file search, code execution, and custom OpenAPI actions; publish to a community agent marketplace; delegate sub-tasks to isolated child agents with independent context windows.
- Generative Artifacts - Render React components, HTML pages, and Mermaid diagrams directly inside the chat UI, enabling live visual prototyping without leaving the conversation.
- Resumable Streams - Redis-backed stream resumption automatically reconnects in-progress AI responses after network drops, with multi-tab and multi-device synchronization for horizontal deployments.
- Enterprise Authentication - Multi-user access via OAuth2 (Google, GitHub, Discord, Apple, Facebook), LDAP, SAML, and OIDC with two-factor auth, token spend tracking, and per-user moderation controls.
- Image Generation & Editing - Generate and iterate on images via GPT-Image-1, DALL-E 3, Stable Diffusion, Flux, or any MCP-connected image server from within any conversation.
- Web Search with Reranking - Live internet retrieval powered by configurable search providers and Jina-based result reranking for accuracy, injected directly into the AI context.
- Conversation Branching & Presets - Fork any message into a parallel conversation, save and share model configuration presets, and resubmit with full context control.
- Speech & Audio - Hands-free interaction via Speech-to-Text and Text-to-Speech using OpenAI, Azure OpenAI, and ElevenLabs APIs with automatic send and playback.
- Multilingual UI - Interface available in 40+ languages including Chinese, Arabic, Japanese, Korean, Russian, and more, with active community translation via Locize.
- Full-Text Conversation Search - Indexed search across all messages and files using MeiliSearch, with sync tooling for existing conversation history.
Common Use Cases
- Private AI workspace for engineering teams - A software company deploys LibreChat on-premises, granting developers access to Claude Sonnet for code review, GPT-5 for architecture discussions, and a shared sandboxed Python interpreter for data analysis, all behind corporate SSO and with spend tracked per user.
- Building a specialized internal AI agent - An operations team uses the no-code agent builder to create an assistant that connects to their ticketing system via a custom OpenAPI action, queries a RAG vector store for runbooks, and executes diagnostic scripts in the code interpreter — all accessible to on-call engineers through a shared agent link.
- Academic research environment - A university research lab self-hosts LibreChat to let PhD students switch between Gemini 2.5 Pro, DeepSeek-R1, and Claude for literature analysis, use Web Search to pull recent papers, and run statistical code in the interpreter, with conversation history fully retained on-premises per data governance requirements.
- Compliance-sensitive AI deployment - A legal or financial services firm runs LibreChat air-gapped on local models via Ollama, ensuring no prompt data ever reaches external APIs, with LDAP authentication enforcing role-based access and conversation export locked down to authorized personnel.
- Content creation studio - A creative agency uses LibreChat as a unified interface where writers switch between models for tone, use DALL-E 3 for concept images, generate Mermaid diagrams for client presentation flows, and export polished conversations as Markdown for CMS publishing.
Under The Hood
Architecture LibreChat is organized as an npm workspace monorepo with Turborepo orchestrating builds across four packages — data-schemas, data-provider, a shared API package, and a client package — plus the main api and client applications. The backend follows a layered service architecture: Express route handlers delegate to focused service modules (AuthService, ActionService, PermissionService, ToolService, MCP initialization), each with narrow responsibilities and minimal cross-cutting concerns. AI provider clients are abstracted behind a unified BaseClient interface in the api/app/clients layer, making it straightforward to add new providers without touching route or UI code. The RAG pipeline is extracted into a separate service (rag_api) that communicates over HTTP, enabling independent scaling or replacement. Docker Compose profiles toggle optional services on-demand, and the Helm chart supports production Kubernetes deployments with Redis-backed horizontal scaling.
Tech Stack The backend runs Node.js 20 with Express and TypeScript, persisting data in MongoDB accessed through Mongoose-style models, and indexing conversations in MeiliSearch for full-text search. A separate PostgreSQL instance with pgvector stores RAG embeddings. The frontend is React with Vite, Tailwind CSS, and React Query for server state, bundled and served via Nginx. Redis provides the pub/sub layer for resumable streaming and distributed job state. Authentication strategies (JWT, LDAP, OIDC, SAML, Apple, Discord, GitHub, Google, Facebook) are implemented as individual Passport.js strategy files. Build orchestration runs through Turbo with tsdown and Rollup for package builds. Optional integrations span S3/CloudFront for file storage, ElevenLabs for TTS, and any MCP-compatible external tool server.
Code Quality The project maintains extensive test coverage: roughly 480 Jest test and spec files spanning unit, integration, and strategy-level tests across the API, packages, and configuration utilities, supplemented by a full Playwright end-to-end suite including accessibility test configurations. Core service files — AuthService, MCP initialization, OAuth strategies — each have dedicated spec files with edge-case scenarios. TypeScript is enforced throughout the shared packages and progressively adopted in the API layer, with ESLint, Prettier, and Husky pre-commit hooks maintaining consistent formatting. CI on GitHub Actions runs the full test matrix, and recent releases show dedicated accessibility improvement passes following WCAG audits.
What Makes It Unique LibreChat’s most technically distinctive quality is treating MCP (Model Context Protocol) as a first-class, UI-manageable feature rather than a config-only integration: users can add, configure, authenticate, and share MCP servers directly from the interface, with domain restrictions, OAuth flow handling, and per-server credential variables stored in the database. The agent system supports SKILL.md instruction bundles — analogous to the project’s own use of Claude Code skills — and spawns subagents with isolated context windows via an event-driven lazy tool loading system that only resolves tool definitions when needed at inference time. The Redis streaming layer implements delta buffering with sequential event ordering to handle out-of-order SSE events, a real-world reliability concern that most self-hosted AI projects ignore. The result is a platform that handles both casual single-user deployments and multi-replica enterprise rollouts from the same codebase with no feature-gating.
Self-Hosting
LibreChat is released under the MIT License, which is one of the most permissive open-source licenses available. You can use it commercially, modify it freely, distribute it, and sublicense it without restriction. The only obligation is preserving the copyright notice and license text. There are no copyleft requirements — you do not need to open-source modifications you make for internal use. The entire feature set, including agents, MCP tools, enterprise authentication, and the code interpreter, is available without any paid tier or license key.
Running LibreChat in production requires managing a multi-service Docker Compose stack: the main Node.js API, a MongoDB database, a MeiliSearch instance for conversation search, a PostgreSQL database with the pgvector extension for RAG embeddings, a separate Python-based RAG API service, and optionally Redis for resumable streams and horizontal scaling. You are responsible for database backups, MongoDB replication for high availability, keeping all services patched and updated, and configuring reverse proxy and TLS termination. The project ships update tooling (npm run update and a smart-reinstall script) and a well-maintained Helm chart for Kubernetes, which reduces operational friction, but the infrastructure burden is real — this is not a single-binary deployment.
Compared to hosted AI interfaces like ChatGPT Plus or Claude.ai, you gain complete data sovereignty and the ability to bring your own API keys at cost, but you take on full responsibility for uptime, backups, and security hardening. There is no official enterprise support contract, managed upgrade path, or SLA — community support runs through Discord and GitHub Issues, which are both active given the project’s scale. The active contributor base and frequent release cadence (roughly two releases per month) mean the project stays current with new models and providers quickly, but production operators need a process for evaluating and applying updates, as the changelog explicitly flags breaking changes that require review before upgrading.
Related Apps
AutoGPT
Automation · Productivity · AI Assistants
Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.
AutoGPT
OtherOllama
AI Development · Developer Tools
Run Llama, Gemma, DeepSeek, and other open LLMs on your own machine with one command and an OpenAI-compatible API.
Ollama
MITDify
No Code Platforms · AI Development · Developer Tools
Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.