Skip to content
JonasKenke/chainlit-ng

JonasKenke/chainlit-ng

github.com • November 25, 2026

Build production-ready conversational AI applications in Python. Tool-call approvals, agent questions, a versioned prompt and skill library, observability, and a modern React 19 frontend — in minutes, not weeks.

Fork notice Chainlit NG is an independent fork of the original Chainlit project. The upstream project is no longer actively maintained. This line continues development with security fixes, a React 19 frontend, and the interaction features below. The source, issues, and releases live at JonasKenke/chainlit-ng . The Python import is still import chainlit as cl . Only the distribution and CLI names changed.

Chainlit NG is an independent fork of the original Chainlit project. The upstream project is no longer actively maintained. This line continues development with security fixes, a React 19 frontend, and the interaction features below. The source, issues, and releases live at JonasKenke/chainlit-ng .

The Python import is still import chainlit as cl . Only the distribution and CLI names changed.

Requires Python 3.10 or newer. The CLI is now chainlit-ng ; the chainlit command remains as an alias, so existing scripts keep working.

If the hello app opens in your browser, you are all set.

Run it with auto-reload:

Tool-call approvals. Pause a tool with @cl.step(requires_approval=True) or the explicit cl.Approval API. The server keeps the real arguments; the card shows a redacted preview. Users can approve, reject, edit generated form fields, or request changes with a . Resolved cards show a colored decision status. See docs/approvals.md .

Agent questions. cl.ask supports a single question or a multi-field wizard with text, email, date, number, URL, phone, single-select, and checkbox multi-select fields. Fields can be prefilled or optional; free text can accompany checked options; the wizard has 1/N progress, Back and , and a review step. Answers carry per-field provenance and are marked as untrusted user input. See docs/questions.md .

Thread sharing and grants. Opt-in read-only sharing with named users, scoped by the data layer. See docs/thread-sharing.md .

Safer MCP. Servers are declared by name in server-side config, user-provided servers require an explicit URL allowlist, and per-user OAuth is supported for streamable HTTP. See docs/mcp-oauth.md .

OpenTelemetry traces. Opt-in OTLP/HTTP export from the step tree, with a fixed redaction allowlist and bounded span attributes. See docs/telemetry.md .

Library, prompts, and skills. One Library dialog with Prompts and Skills tabs. Save, , insert, edit, , and version prompts; create, import, review, enable, , and update skills. See Prompt and skill Library .

Scheduled prompts. Carried forward from 2.12: recurring prompt runs with model selection, optional chat profiles, and optional after-hooks. See Scheduled prompts .

UI improvements. Optional message timestamps, compact chain-of-thought display, side-view opening by element id, and a configurable upload directory outside APP_ROOT .

cl.ask accepts one question or a typed multi-field form. Checkbox questions use multiple=True and can combine checked options with an optional Other answer.

The card shows one field at a time with 1/6 progress, Back and , and a review step before Submit. Typed fields validate in the browser and again on the server; optional fields are omitted from the answer. Checkbox answers return option_ids plus labels , and their Other text is additive. See docs/questions.md for the full contract.

Prompt and skill Library

With both features enabled, the composer Library is the entry point. It uses one icon and one dialog with two tabs instead of separate composer buttons.

Prompt gallery entries and per-user skill rows live in the data layer. Sharing links require authentication; a no-auth app hides the controls and rejects and link-add requests.

Save composer text as a prompt, create one from the Library, , insert, edit, and delete.

a prompt by link. Every content change appends an immutable version.

Open a shared link to add a pinned copy. The copy keeps the source version it was added from and never updates silently.

When the source moves ahead, the Library shows a grouped notice, an update chip, and a diff against the source version. Update, downgrade to an older version, or detach explicitly. A downgrade refreshes the notice without re-alerting for a version that was already acknowledged.

Versions written before the link are private. Public routes expose only the baseline and later versions.

Author a skill in Markdown, import one, export it, or add a shared copy.

The Library filters skills by All, Active, Needs review, and Updates.

Imports and shared copies start disabled. Use the enable toggle to open the review dialog, inspect the instructions, and enable the reviewed version.

Local self-authored edits keep the skill enabled. Edits to an imported or pinned skill disable it until the changed body is reviewed again.

Skills use the same version and pinned-copy contract as prompts. Applying a source version stores the copy disabled, so it must pass review before use.

See docs/skills.md and docs/prompt-versioning.md for the full model and API contract.

Scheduled prompts reuse the app's message path: the scheduler prepares the saved model and chat profile, then calls on_message on the selected recurrence.

Scheduling requires authentication and a data layer with scheduled-task support. Register set_scheduled_task_models to show a model dropdown; with one model the dropdown is hidden and that model is used automatically. When the app exposes more than one chat profile, the form also shows a profile selector. Optional after-hooks are registered with after_scheduled_task . Recurrence presets cover daily, weekdays, weekly, monthly, and a custom every-N-hours schedule. The browser timezone is used automatically.

See docs/scheduled-prompts.md for the callback contract, model application, after-hooks, and recurrence details.

Review a tool call and decide.

Resolved cards keep a clear status line.

Single question with options and free text.

The answer stays visible after submission.

Typed fields with progress and Back/ .

Checkbox answers can add an Other answer.

Review every answer before submitting.

Starting a new chat warns before discarding a pending approval or question.

Library and scheduled prompts

One Library for saved prompts and skills.

Review a source version before updating a pinned copy.

Imported skills stay disabled until reviewed.

Recurring prompts with timezone and run.

Security fixes in this line include:

MCP CVE-2026-45018 (client-supplied stdio command execution) and CVE-2026-45019 (SSRF via user-provided MCP URLs and headers). See the MCP advisory .

Azure AD hybrid OAuth state and id_token verification with a per-login nonce.

A structured 422 response for lone UTF-16 surrogates instead of a 500.

Element ownership checks and upload validation.

Markdown and media rendering hardening.

Thread-grant ACLs, including owner-identity stripping for grantees.

OpenTelemetry redaction and export bounds.

This is not a claim that every upstream bug is fixed. See the changelog for the full list.

Security and maintenance

This fork is maintained on a best-effort basis. No guarantee is made that security patches, upstream fixes, advisories, or compatibility updates will be provided, backported, or released on any timeline. The security fix list above is historical and does not imply future coverage. Review the code and pin the dependencies you have tested before using it in production.

See SECURITY.md for how to report a vulnerability. Response and fix timelines are not guaranteed.

Upgrading from upstream Chainlit 2.x or a 2.12 fork build? The 3.0 migration guide covers the Python and npm renames, the Recoil to Zustand change, and breaking configuration updates.

Contributions are welcome, whether it is a bug report, a documentation fix, or a feature. Open an issue or a pull request , and start with CONTRIBUTING.md . Then run the backend and frontend checks described there before opening a pull request.

Chainlit NG is open source under the Apache License 2.0 .

Chainlit NG is an independent fork of Chainlit , maintained at JonasKenke/chainlit-ng . The original project is no longer actively maintained upstream. This repository continues that work under the Apache-2.0 license; the original authors and contributors retain credit for the code and documentation they wrote.