Metadata-Version: 2.5
Name: chainlit-community
Version: 3.0.0
Summary: Community maintenance fork of Chainlit, the framework for building conversational AI apps, by a former core maintainer. Security and bug fixes, no new features.
Project-URL: Homepage, https://chainlit.io/
Project-URL: Documentation, https://docs.chainlit.io/
Project-URL: Repository, https://github.com/chainlit-community/chainlit
Author: Willy Douhard, Dan Andre Constantini
License: Apache-2.0
Keywords: Agents,LLM,MCP,chat ui,chatbot ui,conversational ai,copilot,gen ai,langchain,openai
Classifier: Environment :: Web Environment
Classifier: Framework :: FastAPI
Classifier: Programming Language :: JavaScript
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: <3.14.0,>=3.11.5
Requires-Dist: aiofiles>=23.1.0
Requires-Dist: asyncer<0.1.0,>=0.0.8
Requires-Dist: click<9.0.0,>=8.1.3
Requires-Dist: dataclasses-json<0.7.0,>=0.6.7
Requires-Dist: fastapi>=0.133.0
Requires-Dist: filetype<2.0.0,>=1.2.0
Requires-Dist: httpx>=0.23.0
Requires-Dist: lazify<0.5.0,>=0.4.0
Requires-Dist: mcp<2.0.0,>=1.30.0
Requires-Dist: nest-asyncio<2.0.0,>=1.6.0
Requires-Dist: packaging>=23.1
Requires-Dist: pydantic-settings>=2.14.2
Requires-Dist: pydantic<3,>=2.11.0
Requires-Dist: pyjwt<3.0.0,>=2.15.0
Requires-Dist: python-dotenv<2.0.0,>=1.2.2
Requires-Dist: python-multipart<1.0.0,>=0.0.31
Requires-Dist: python-socketio<6.0.0,>=5.16.2
Requires-Dist: starlette>=1.3.1
Requires-Dist: syncer<3.0.0,>=2.0.3
Requires-Dist: tomli<3.0.0,>=2.0.1
Requires-Dist: uvicorn>=0.35.0
Requires-Dist: watchfiles<2.0.0,>=1.1.1
Provides-Extra: custom-data
Requires-Dist: asyncpg<1.0.0,>=0.30.0; extra == 'custom-data'
Requires-Dist: azure-identity<2.0.0,>=1.14.1; extra == 'custom-data'
Requires-Dist: azure-storage-blob<13.0.0,>=12.24.0; extra == 'custom-data'
Requires-Dist: azure-storage-file-datalake<13.0.0,>=12.14.0; extra == 'custom-data'
Requires-Dist: boto3<2.0.0,>=1.34.73; extra == 'custom-data'
Requires-Dist: google-cloud-storage<4.0.0,>=2.19.0; extra == 'custom-data'
Requires-Dist: sqlalchemy<3.0.0,>=2.0.28; extra == 'custom-data'
Provides-Extra: mypy
Requires-Dist: mypy-boto3-dynamodb<2.0.0,>=1.34.113; extra == 'mypy'
Requires-Dist: mypy<2.0.0,>=1.13; extra == 'mypy'
Requires-Dist: pandas-stubs<4.0.0,>=2.2.2; (python_version >= '3.9') and extra == 'mypy'
Requires-Dist: types-aiofiles<26.0.0,>=23.1.0.5; extra == 'mypy'
Requires-Dist: types-requests<3.0.0,>=2.31.0.2; extra == 'mypy'
Provides-Extra: tests
Requires-Dist: aiosqlite<1.0.0,>=0.20.0; extra == 'tests'
Requires-Dist: botbuilder-core<5.0.0,>=4.15.0; extra == 'tests'
Requires-Dist: discord<3.0.0,>=2.3.2; extra == 'tests'
Requires-Dist: langchain>=1.0.0; extra == 'tests'
Requires-Dist: llama-index<1.0.0,>=0.13.0; extra == 'tests'
Requires-Dist: matplotlib<4.0.0,>=3.7.1; extra == 'tests'
Requires-Dist: moto<6.0.0,>=5.0.14; extra == 'tests'
Requires-Dist: openai<3.0.0,>=2.0.0; extra == 'tests'
Requires-Dist: pandas<4.0.0,>=2.2.2; extra == 'tests'
Requires-Dist: plotly<7.0.0,>=5.3.0; extra == 'tests'
Requires-Dist: polars<2.0.0,>=1.0.0; extra == 'tests'
Requires-Dist: pytest-asyncio<2.0.0,>=1.0.0; extra == 'tests'
Requires-Dist: pytest-cov<7.0.0,>=6.0.0; extra == 'tests'
Requires-Dist: pytest<10.0.0,>=8.3.2; extra == 'tests'
Requires-Dist: semantic-kernel<2.0.0,>=1.24.0; extra == 'tests'
Requires-Dist: slack-bolt<2.0.0,>=1.18.1; extra == 'tests'
Requires-Dist: tenacity<10.0.0,>=9.0.0; extra == 'tests'
Requires-Dist: transformers<6.0,>=5.0; extra == 'tests'
Description-Content-Type: text/markdown

<h1 align="center">Welcome to Chainlit 👋</h1>

<p align="center">
<b>Build python production-ready conversational AI applications in minutes, not weeks ⚡️</b>

</p>
<p align="center">
    <a href="https://github.com/chainlit-community/chainlit/graphs/contributors" rel="nofollow"><img alt="Contributors" src="https://img.shields.io/github/contributors/chainlit-community/chainlit" style="max-width:100%;"></a>
    <a href="https://github.com/chainlit-community/chainlit/actions/workflows/ci.yaml" rel="nofollow"><img alt="CI" src="https://github.com/chainlit-community/chainlit/actions/workflows/ci.yaml/badge.svg" style="max-width:100%;"></a>
    <a href="https://opencollective.com/chainlit" rel="nofollow"><img alt="Backers on Open Collective" src="https://opencollective.com/chainlit/backers/badge.svg" style="max-width:100%;"></a>
    <!-- Re-enable once we have actual sponsors
    <a href="https://opencollective.com/chainlit" rel="nofollow"><img alt="Sponsors on Open Collective" src="https://opencollective.com/chainlit/sponsors/badge.svg" style="max-width:100%;"></a>
    -->
</p>

> ⚠️ **Notice:** this is the community-maintained fork of Chainlit.
>
> The original repository, [Chainlit/chainlit](https://github.com/Chainlit/chainlit), has been archived by its owners. Maintenance continues here, in [chainlit-community/chainlit](https://github.com/chainlit-community/chainlit).
>
> This fork is not affiliated with, maintained by or endorsed by Chainlit SAS, which provides no warranties on it.
>
> **Scope:** we fix security issues and bugs, and we remove functionality so that it can be plugged in by others later. We do not add features.

<p align="center">
    <a href="https://docs.chainlit.io"><b>Documentation</b></a>  •  
    <a href="https://github.com/Chainlit/cookbook"><b>Cookbook</b></a>  •  
    <a href="https://opencollective.com/chainlit"><b>Open Collective</b></a>
</p>

The documentation and cookbook linked above are those of the original Chainlit. They are not maintained by this fork and may be outdated. We intend to bring the documentation into this repository, so that it is always updated in sync with the code. The Discord and Twitter account linked from this page also belong to the original project.

https://github.com/user-attachments/assets/b3738aba-55c0-42fa-ac00-6efd1ee0d148

## Installation

This fork is published on PyPI as [`chainlit-community`](https://pypi.org/project/chainlit-community/). Only the name of the distribution is different: you still `import chainlit` in Python and run the `chainlit` command.

Use the one command that matches your tooling:

```sh
# pip
pip install chainlit-community

# uv, in a project: records the dependency in pyproject.toml
uv add chainlit-community

# uv, without a project: installs into the active virtual environment only
uv pip install chainlit-community

# poetry
poetry add chainlit-community
```

Extras go on the new name as well, e.g. `pip install "chainlit-community[custom-data]"`.

> ⚠️ **Warning:** if the original `chainlit` distribution is installed, uninstall it first (`pip uninstall chainlit`). `chainlit` and `chainlit-community` both provide the `chainlit` import package, so when both are installed they overwrite each other's files.
>
> `pip install chainlit` still installs the last release of the original project from PyPI. That package is unmaintained and does not receive the security fixes made in this fork. For security reasons, we strongly recommend that you do not install it. A third-party package that depends on `chainlit` will pull it in alongside `chainlit-community`; `pip show chainlit` tells you whether it is installed and what requires it.

The [PyPI project page](https://pypi.org/project/chainlit-community/#history) and the [Releases page](https://github.com/chainlit-community/chainlit/releases) show which versions have been published. To install a release candidate, pin it exactly, e.g. `pip install chainlit-community==3.0.0rc1`. If the version you need has not been published yet, use a preview build.

Coming from the original `chainlit`? Each final release has an [upgrade guide](https://github.com/chainlit-community/chainlit/tree/main/docs/releases).

Then check that it works:

```sh
chainlit hello
```

If this opens the `hello app` in your browser, you're all set!

### Preview builds

Every commit on `main` that passes CI is published as a pre-release on [GitHub Releases](https://github.com/chainlit-community/chainlit/releases), with a version such as `3.0.0.dev1234`. Preview builds are not published to PyPI. Pick one from the Releases page and install its wheel by URL, replacing `<version>`. Use the one command that matches your tooling:

```sh
# pip
pip install https://github.com/chainlit-community/chainlit/releases/download/<version>/chainlit_community-<version>-py3-none-any.whl

# uv, in a project: records the dependency in pyproject.toml
uv add "chainlit-community @ https://github.com/chainlit-community/chainlit/releases/download/<version>/chainlit_community-<version>-py3-none-any.whl"

# uv, without a project: installs into the active virtual environment only
uv pip install https://github.com/chainlit-community/chainlit/releases/download/<version>/chainlit_community-<version>-py3-none-any.whl

# poetry
poetry add https://github.com/chainlit-community/chainlit/releases/download/<version>/chainlit_community-<version>-py3-none-any.whl
```

The notes of each release have these commands with the version filled in, plus how to verify the download against `SHA256SUMS` and its build provenance attestation. The wheel includes the built frontend, so Node and pnpm are not needed.

### From source

To install the current state of `main` (or another branch) straight from GitHub:

```sh
pip install git+https://github.com/chainlit-community/chainlit.git#subdirectory=backend/
```

(Requires Node and pnpm installed on the system.)

## 🚀 Quickstart

### 🐍 Pure Python

Create a new file `demo.py` with the following code:

```python
import chainlit as cl


@cl.step(type="tool")
async def tool():
    # Fake tool
    await cl.sleep(2)
    return "Response from the tool!"


@cl.on_message  # this function will be called every time a user inputs a message in the UI
async def main(message: cl.Message):
    """
    This function is called every time a user inputs a message in the UI.
    It sends back an intermediate response from the tool, followed by the final answer.

    Args:
        message: The user's message.

    Returns:
        None.
    """


    # Call the tool
    tool_res = await tool()

    await cl.Message(content=tool_res).send()
```

Now run it!

```sh
chainlit run demo.py -w
```

<img src="/images/quick-start.png" alt="Quick Start"></img>

## 📚 More Examples - Cookbook

You can find various examples of Chainlit apps [here](https://github.com/Chainlit/cookbook) that leverage tools and services such as OpenAI, Anthropiс, LangChain, LlamaIndex, ChromaDB, Pinecone and more.

## 🛠 Maintenance and governance

The primary maintainer of this fork is Mathijs de Bruin ([@dokterbob](https://github.com/dokterbob), <mathijs@mathijsfietst.nl>), who was one of the maintainers of the original Chainlit.

The fork is run and supported by enterprise users who have compliance and security needs, and by [Open Collective](https://opencollective.com/chainlit) sponsors.

We are explicitly open to additional maintainers. To keep the supply chain secure, we ask that maintainers:

- have a track record of quality contributions, here or on the original project;
- can verify their identity;
- have stable contact details (email).

## 💖 Sponsoring

You can support the maintenance of this fork through the [Chainlit Open Collective](https://opencollective.com/chainlit).

We are open to discussing how to fairly share any income from the Open Collective amongst maintainers.

## 💁 Contributing

We currently do not accept contributions that add new features. We welcome bug fixes (including CI, reliability, package management and tooling improvements and simplifications) and feature reductions, such as removing legacy functionality.

For what we accept and how to contribute, see [here](/CONTRIBUTING.md).

Security fixes are handled privately: report vulnerabilities through the [security policy](/SECURITY.md), never in a public issue or pull request.

## 📃 License

Chainlit is open-source and licensed under the [Apache 2.0](LICENSE) license.
