chainlit-generative-ui
Use Chainlit generative UI as the active interaction layer for structured Chainlit turns while
keeping the normal text response.
Working rules:
- Call
render_chainlit_ui only when that tool is available in the current tool list. If it is absent, answer normally in text.
- Default to rendering UI for concise, user-facing structure: summaries, decision cards, status panels, short checklists, small tables, and follow-up actions.
- Include
actions when the user may want next steps. Prefer useful continuation buttons such as "Run tests", "Show diff", "Explain config", or "Create PR".
- Skip UI for simple one-sentence answers, conversational acknowledgements, and cases where a panel would duplicate the text without adding interaction.
- Do not render arbitrary JSX, HTML, scripts, or custom component names. This runtime only exposes the whitelisted
GeneratedPanel component through render_chainlit_ui.
- Do not describe generated panels as above or below the answer. Chainlit renders them after the text response, so use non-positional wording such as "the generated panel" or "the panel actions."
- Put only plain strings in
items. Do not put objects with label and prompt there.
- Put prompt buttons in
actions. Treat each button as a user-facing follow-up request with a clear label and prompt.
- For checklist-style panels with follow-up buttons, put the checklist labels in
items and the clickable follow-ups in actions.
- Do not duplicate the same option in
items and actions. If it is clickable, put it only in actions.
- Keep generated panels compact. Put detailed reasoning, long explanations, code, logs, and large datasets in the text response or files instead.
- Do not put secrets, hidden reasoning, system messages, or internal tool details in the panel.
- Reuse
id only when updating the same panel. Use a stable, short id such as deployment-summary or review-findings.
Supported render_chainlit_ui fields:
title: short required panel title.
summary: optional concise summary.
facts: optional key-value object for compact facts.
items: optional short list of strings. Do not use this field for prompt buttons.
table: optional object with columns and rows.
actions: optional list of prompt buttons, each with label and prompt.
id: optional stable panel id. Reusing the id updates the existing panel.
Example tool call:
{
"title": "Review Summary",
"summary": "Two blocking issues need fixes before merge.",
"facts": {
"Status": "Needs changes",
"Tests": "Targeted suite passed"
},
"items": [
"Fix stale Chainlit element updates",
"Add disabled-config coverage"
],
"table": {
"columns": ["Area", "Result"],
"rows": [
["Runtime", "Tool enabled only when configured"],
["Chainlit", "GeneratedPanel rendered as its own message"]
]
},
"actions": [
{
"label": "Show fixes",
"prompt": "Show me the exact fixes for the blocking review issues."
},
{
"label": "Run tests",
"prompt": "Run the targeted tests for this change."
}
],
"id": "review-summary"
}
After calling the tool, continue with the normal answer. The panel should complement the answer, not replace it. Refer to it without above/below placement language.
1---2name: chainlit-generative-ui3description: Use this skill in Chainlit when a response would benefit from a generated visual panel, interactive prompt buttons, a compact facts view, a short list, or a small comparison/status table using the render_chainlit_ui tool.4---56# chainlit-generative-ui78Use Chainlit generative UI as the active interaction layer for structured Chainlit turns while9keeping the normal text response.1011Working rules:12131. Call `render_chainlit_ui` only when that tool is available in the current tool list. If it is absent, answer normally in text.142. Default to rendering UI for concise, user-facing structure: summaries, decision cards, status panels, short checklists, small tables, and follow-up actions.153. Include `actions` when the user may want next steps. Prefer useful continuation buttons such as "Run tests", "Show diff", "Explain config", or "Create PR".164. Skip UI for simple one-sentence answers, conversational acknowledgements, and cases where a panel would duplicate the text without adding interaction.175. Do not render arbitrary JSX, HTML, scripts, or custom component names. This runtime only exposes the whitelisted `GeneratedPanel` component through `render_chainlit_ui`.186. Do not describe generated panels as above or below the answer. Chainlit renders them after the text response, so use non-positional wording such as "the generated panel" or "the panel actions."197. Put only plain strings in `items`. Do not put objects with `label` and `prompt` there.208. Put prompt buttons in `actions`. Treat each button as a user-facing follow-up request with a clear label and prompt.219. For checklist-style panels with follow-up buttons, put the checklist labels in `items` and the clickable follow-ups in `actions`.2210. Do not duplicate the same option in `items` and `actions`. If it is clickable, put it only in `actions`.2311. Keep generated panels compact. Put detailed reasoning, long explanations, code, logs, and large datasets in the text response or files instead.2412. Do not put secrets, hidden reasoning, system messages, or internal tool details in the panel.2513. Reuse `id` only when updating the same panel. Use a stable, short id such as `deployment-summary` or `review-findings`.2627Supported `render_chainlit_ui` fields:2829- `title`: short required panel title.30- `summary`: optional concise summary.31- `facts`: optional key-value object for compact facts.32- `items`: optional short list of strings. Do not use this field for prompt buttons.33- `table`: optional object with `columns` and `rows`.34- `actions`: optional list of prompt buttons, each with `label` and `prompt`.35- `id`: optional stable panel id. Reusing the id updates the existing panel.3637Example tool call:3839```json40{41 "title": "Review Summary",42 "summary": "Two blocking issues need fixes before merge.",43 "facts": {44 "Status": "Needs changes",45 "Tests": "Targeted suite passed"46 },47 "items": [48 "Fix stale Chainlit element updates",49 "Add disabled-config coverage"50 ],51 "table": {52 "columns": ["Area", "Result"],53 "rows": [54 ["Runtime", "Tool enabled only when configured"],55 ["Chainlit", "GeneratedPanel rendered as its own message"]56 ]57 },58 "actions": [59 {60 "label": "Show fixes",61 "prompt": "Show me the exact fixes for the blocking review issues."62 },63 {64 "label": "Run tests",65 "prompt": "Run the targeted tests for this change."66 }67 ],68 "id": "review-summary"69}70```7172After calling the tool, continue with the normal answer. The panel should complement the answer, not replace it. Refer to it without above/below placement language.