--- id: chainlit version: "2.11.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # chainlit — Build Conversational AI. License: permissive · Maintenance: active · Downloads: 789.4K/mo ## What it is and what it does Chainlit is a Python framework that wraps FastAPI and async utilities to rapidly prototype and deploy conversational AI applications with a web-based chat UI. It handles the plumbing of message routing, async execution, and real-time bidirectional communication via WebSocket, letting you focus on the conversation logic itself. You write Python functions decorated with Chainlit handlers (like @cl.on_message) that receive user input and send responses back to the browser. The framework manages the UI, session state, and async orchestration. It's designed for building chatbots, agents, and copilots that integrate with language models and external tools, and includes support for intermediate steps, tool calls, and streaming responses. Use it for: - Prototype a chatbot or conversational agent that calls an LLM API and returns responses in a web UI. - Build a multi-turn conversation system with tool use, where intermediate steps are visible to the user. - Deploy a copilot or assistant interface that integrates with external APIs or knowledge bases. - Create a debugging or testing interface for LLM-based workflows with step-by-step execution visibility. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Chainlit provides a web UI framework for building conversational AI applications in Python, handling message routing, async execution, and real-time communication between a backend and browser-based chat interface. Yes, if you need to rapidly prototype or deploy a conversational AI application with a web UI and are comfortable with Python async patterns. The low install friction, active maintenance, and permissive license make it a practical choice. The large dependency footprint (24 packages) and community-maintained status (as of May 2025) are trade-offs to accept if the UI and async orchestration features justify the overhead for your use case. ## Install pip install chainlit uv add chainlit poetry add chainlit ## Installing chainlit Before you install: Low install friction with a pure Python wheel. The package has 24 runtime dependencies including FastAPI, uvicorn, and async utilities, but all are standard PyPI packages. Maintenance is active with recent commits and community stewardship as of May 2025. License in practice: Apache-2.0 is permissive; you can use, modify, and distribute Chainlit in commercial applications provided you include the license notice and state significant changes. Quickstart: pip install chainlit import chainlit as cl @cl.on_message async def main(message: cl.Message): await cl.Message(content="Response").send() # Run with: chainlit run script.py Requires Python 3.10 or later; FastAPI and uvicorn will be installed as dependencies. Verify before relying: - Whether the package includes built-in integrations with specific LLM providers (OpenAI, Anthropic, etc.) or requires separate setup. - Performance characteristics under concurrent user load or message volume. - Deployment options and hosting requirements beyond local development. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 789.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags conversational AI web UI, python chatbot framework, LLM chat interface builder, async chat application, agent UI framework, conversational-ai, web-ui, async-framework [View on SkillFed](https://skillfed.io/packages/chainlit) · [View on PyPI](https://pypi.org/project/chainlit/)