LibreChat is a self-hosted AI chat platform that consolidates access to major AI providers—including OpenAI, Anthropic, Google Vertex AI, Azure OpenAI, AWS Bedrock, DeepSeek, Mistral, and more—into a unified, customizable interface. Designed for developers, enterprises, and privacy-conscious users, it eliminates vendor lock-in by enabling full control over AI infrastructure while supporting multimodal interactions, code execution, and agent-based workflows.
Built in TypeScript with Docker and Redis support, LibreChat offers flexible deployment options from local machines to cloud platforms like Railway, Zeabur, and Sealos. It integrates Model Context Protocol (MCP), Code Interpreter, and Web Search APIs, and supports OAuth2, LDAP, and SAML for enterprise-grade multi-user authentication, making it ideal for organizations requiring data sovereignty and compliance.
What You Get
- Multi-Model AI Support - Connect to OpenAI, Anthropic (Claude), Google Gemini, Azure OpenAI, AWS Bedrock, DeepSeek, Mistral, OpenRouter, Groq, and over 20 other providers via custom endpoints without proxies.
- Code Interpreter API - Securely execute Python, Node.js, Go, Java, Rust, C/C++, PHP, and Fortran code in a sandboxed environment with direct file upload and download capabilities.
- AI Agents - Build no-code custom assistants with file handling, code execution, and API actions; deploy and share agents via a community marketplace with MCP tool integration.
- Code Artifacts - Generate and display React components, HTML, and Mermaid diagrams directly within chat conversations for visual prototyping and documentation.
- Web Search with Jina Reranking - Enable live internet access for AI models using customizable search providers and Jina-based result reranking for improved relevance.
- Multimodal Chat - Upload and analyze images using Claude 3, GPT-4o, GPT-4.5, Llama-Vision, and Gemini with built-in vision capabilities.
- Resumable Streams - Automatically reconnect and resume AI responses if the connection drops, with multi-tab and multi-device sync powered by Redis.
- Enterprise Authentication - Secure multi-user access with OAuth2, LDAP, SAML, and two-factor authentication, plus token spend tracking and moderation tools.
- Presets & Conversation Branching - Save and switch between AI model configurations and prompt presets mid-chat, fork conversations, and resubmit messages with context control.
- Speech-to-Text & Text-to-Speech - Enable hands-free interaction with OpenAI, Azure OpenAI, and ElevenLabs audio APIs for voice input and output.
- Import/Export Conversations - Import chats from ChatGPT or Chatbot UI and export as JSON, Markdown, text, or screenshots for archiving and sharing.
- Search Across Conversations - Instantly search all messages, files, and code snippets across your chat history with full-text indexing.
Common Use Cases
- Running a private AI research lab - A university team deploys LibreChat on-premises to analyze academic papers with GPT-4o and Claude 3, using Code Interpreter to run Python scripts and Web Search to pull latest publications.
- Building a customer support AI agent - A SaaS company creates a custom agent in LibreChat that accesses internal docs, executes code to parse logs, and uses DALL-E to generate UI mockups—all behind their corporate SAML SSO.
- Developing AI-powered content tools - A freelance writer uses LibreChat to switch between GPT-4, DeepSeek, and Mistral models, generates images with DALL-E 3 and Stable Diffusion, and exports final drafts as Markdown for CMS integration.
- Deploying a secure AI assistant for government use - A public agency self-hosts LibreChat with LDAP auth and no external data leakage to provide employees with a compliant interface to Anthropic and AWS Bedrock models for policy analysis.
Under The Hood
Architecture
- Monorepo structure with clearly separated workspaces for API, client, and shared data models, enforcing strict boundaries between concerns
- Modular service layer using strategy pattern to abstract LLM and search providers, enabling dynamic substitution via configuration
- Microservice-ready design with decoupled RAG and vector database components communicating over HTTP, supporting independent scaling and replacement
- Docker-compose orchestration with environment profiles that toggle services on-demand, ensuring flexible deployment scenarios
- Build pipeline orchestrated by Turbo to manage cross-package dependencies, ensuring type safety and efficient incremental builds
Tech Stack
- Node.js 20 backend with Express and TypeScript, backed by MongoDB and Meilisearch for scalable data storage and semantic search
- React frontend built with Vite and Tailwind CSS, bundled and served via Nginx for high-performance static asset delivery
- Dockerized microservices including PostgreSQL with pgvector for vector embeddings, with optional integrations for Ollama and LiteLLM
- Comprehensive configuration system using YAML and environment variables to manage settings, storage strategies, and plugin behaviors
- End-to-end testing via Playwright and CI/CD pipelines on GitHub Actions, ensuring reliability across deployment environments
Code Quality
- Extensive test coverage spanning unit, integration, and end-to-end layers with robust edge case handling
- Strong TypeScript enforcement across all layers, ensuring type-safe APIs, cache structures, and agent configurations
- Clean, modular code organization with well-defined separation between data providers, API endpoints, UI components, and caching
- Consistent naming, structure, and test file conventions across frontend and backend, enhancing maintainability
- Integrated linting and type-checking in the build process, minimizing runtime errors and enforcing coding standards
What Makes It Unique
- Native plugin authentication system with dynamic credential decryption and per-user isolation, eliminating external secrets dependencies
- Database-driven agent categories with localized labels and zero hardcoded UI values, enabling true multi-language and user-customizable marketplaces
- Context-aware keyboard navigation in tab systems with row-based arrow logic, delivering accessibility beyond standard ARIA patterns
- Unified auth map resolver that concurrently decrypts and maps multiple plugin credentials in a single atomic operation
- SVG-based animated navigation toggle with precise transform stacking and hover-triggered opacity fades, creating a tactile, low-level UI experience