Skip to main content
The native Chainlit UI that is available on port 8000. Should open in your default browser when you run chainlit run.

Supported Features

Preview

URL Parameters

The Chainlit web app supports the following URL query parameters: Example — open the chat with a pre-typed message:
This is useful for creating deep-links into specific conversations, e.g. from a help widget or an email campaign.
Since version 2.9.1.

Window Messaging

When running the Web App inside an iframe, the server and parent window can communicate using window messages. This is useful for sending context information to the Chainlit server and updating your parent window based on the server’s response. Add a @cl.on_window_message decorated function to your Chainlit server to receive messages sent from the parent window.
Then, in your app/website, you can emit a window message like this:
To send a message from the server to the parent window, use cl.send_window_message:
The parent window can listen for messages like this:

Example

Check out this example from the cookbook that uses the window messaging feature: https://github.com/Chainlit/cookbook/tree/main/window-message