chainlit
Build Conversational AI.
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 on this page — 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
chainlit on PyPI
pip
pip install chainlituv
uv add chainlitpoetry
poetry add chainlitInstalling 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 the current Python release (<3.14.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 24 — aiofiles, asyncer, audioop-lts, click, dataclasses-json, fastapi, filetype, httpx, lazify, literalai, mcp, nest-asyncio, packaging, pydantic-settings, pydantic, pyjwt, python-dotenv, python-multipart, python-socketio, starlette, syncer, tomli, uvicorn, watchfiles |
| Maintenance | actively maintained — 114 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 789,417/month — #5,055 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: chainlit-2.11.1-py3-none-any.whl
Keywords: Agents, LLM, MCP, chat ui, chatbot ui, conversational ai, copilot, gen ai, langchain, openai
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
shinychatshinychat provides a chat UI component for…
permissive · top 15,000 on PyPI
openai-chatkitA backend SDK for building chat applications…
unclear · top 15,000 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
ai-parrotAI-Parrot is an async-first Python framework…
permissive · top 15,000 on PyPI
alita-sdkAlita SDK provides a Python framework for…
permissive · top 15,000 on PyPI
rasa-sdkRasa SDK provides a Python framework for…
permissive · top 15,000 on PyPI
langchain-cliCommand-line interface for building, testing,…
permissive · top 15,000 on PyPI
lunaryLunary is a Python SDK that monitors and logs…
unclear · top 15,000 on PyPI
langchain-google-genaiIntegrates Google's Gemini AI models (chat,…
permissive · top 5,000 on PyPI
copilotkitCopilotKit is a Python SDK for building AI…
permissive · top 15,000 on PyPI