Metadata-Version: 2.5
Name: chainnext
Version: 2.12.0
Summary: Chainnext: a Chainlit-compatible framework for building conversational AI.
Project-URL: Homepage, https://github.com/Puyanfar/chainnext
Project-URL: Documentation, https://github.com/Puyanfar/chainnext
Project-URL: Repository, https://github.com/Puyanfar/chainnext
Author: Willy Douhard, Dan Andre Constantini
License: Apache-2.0
Keywords: Agents,LLM,MCP,chainlit,chainnext,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.10
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.116.1
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: literalai==0.1.201
Requires-Dist: mcp<2.0.0,>=1.28.1
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.13.0
Requires-Dist: python-dotenv<2.0.0,>=1.0.0
Requires-Dist: python-multipart<1.0.0,>=0.0.30
Requires-Dist: python-socketio<6.0.0,>=5.11.0
Requires-Dist: starlette>=0.47.2
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 Chainnext 👋</h1>

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

<p align="center">
    <a href="https://pypi.org/project/chainnext" rel="nofollow"><img alt="PyPI" src="https://img.shields.io/pypi/v/chainnext" style="max-width:100%;"></a>
    <a href="https://pypi.org/project/chainnext" rel="nofollow"><img alt="Downloads" src="https://img.shields.io/pypi/dm/chainnext" style="max-width:100%;"></a>
    <a href="https://github.com/Puyanfar/chainnext/graphs/contributors" rel="nofollow"><img alt="Contributors" src="https://img.shields.io/github/contributors/Puyanfar/chainnext" style="max-width:100%;"></a>
    <a href="https://github.com/Puyanfar/chainnext/actions/workflows/ci.yaml" rel="nofollow"><img alt="CI" src="https://github.com/Puyanfar/chainnext/actions/workflows/ci.yaml/badge.svg" style="max-width:100%;"></a>
</p>

Chainnext is a fork of the archived [Chainlit](https://github.com/Chainlit/chainlit) project. The goal is to keep the familiar Chainlit app API while distributing a maintained package under a new name.

<p align="center">
    <a href="https://github.com/Puyanfar/chainnext"><b>Repository</b></a>  •
    <a href="https://docs.chainlit.io"><b>Upstream Chainlit docs</b></a>  •
    <a href="https://github.com/Chainlit/cookbook"><b>Upstream cookbook</b></a>
</p>

## Names: PyPI vs import vs CLI

The **PyPI / GitHub name is `chainnext`**. The **Python import, CLI, and on-disk config names stay `chainlit`** so existing apps keep working.

| What                  | Name          | Example                                            |
| --------------------- | ------------- | -------------------------------------------------- |
| GitHub repository     | `chainnext`   | `https://github.com/Puyanfar/chainnext`            |
| PyPI package          | `chainnext`   | `pip install chainnext`                            |
| Python import         | `chainlit`    | `import chainlit as cl` / `from chainlit import *` |
| CLI                   | `chainlit`    | `chainlit run app.py` / `chainlit hello`           |
| Config directory      | `.chainlit/`  | `.chainlit/config.toml`                            |
| Welcome file          | `chainlit.md` | project-root markdown shown in the UI              |
| Environment variables | `CHAINLIT_*`  | `CHAINLIT_AUTH_SECRET`, `CHAINLIT_PORT`, …         |

Do **not** `pip install chainlit` for this fork, and do **not** `import chainnext` — that module does not exist.

## Installation

Open a terminal and run:

```sh
pip install chainnext
chainlit hello
```

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

### Development version

The latest in-development version can be installed straight from GitHub with:

```sh
pip install git+https://github.com/Puyanfar/chainnext.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-compatible apps [here](https://github.com/Chainlit/cookbook) that leverage tools and services such as OpenAI, Anthropic, LangChain, LlamaIndex, ChromaDB, Pinecone and more.

Tell us what you would like to see added in Chainnext using the GitHub issues.

## 💁 Contributing

As an open-source initiative in a rapidly evolving domain, we welcome contributions, be it through the addition of new features or the improvement of documentation.

For detailed information on how to contribute, see [here](/CONTRIBUTING.md).

## 📃 License

Chainnext is a fork of Chainlit and is open-source under the [Apache 2.0](LICENSE) license.
