Checklist
Steps the user carries out over time, checked off as they go.
≈ 931 tokens per use (tool 488 · guidance 238 · typical payload 205)How token costs are estimated
Example: Checklist
Make me a packing checklist for Italy. A week in July.
Your suitcase
2/10 packedWhen to use
- The user will carry out several steps over time: a cooking timeline, onboarding, a renewal, a launch.
- The user has things to gather and tick off: a packing list, documents to bring.
- Ticking things off helps them keep their place.
When not to use
- The steps are things the agent will do itself. Show an action plan or the activity instead.
- There are only one or two steps. Say them in text.
- The list is information, not tasks. Use plain bullets.
How the agent should use it
- Write each step as an action the user takes, in the order they'll do it.
- For a timeline, give each step a
time("12:30 PM", "Saturday") and, if it helps, a one-linedescription. - For a list of things, use short labels only, and split long lists with
group("Clothing", "Toiletries"). - Set
countLabelwhen a word makes the count clearer:"packed"shows "3/14 packed". - Use
metaonly for an owner ("IT"), in a few words. - Only add
submitLabelwhen the user's progress changes what you do next, e.g. "I have everything" before confirming an appointment. - Lifecycle: nothing to set. A checklist doesn't expire or go stale.
Layouts
The layout follows the data, so the agent never picks one:
| Items have | Layout |
|---|---|
| Labels only | Rows: a round check and the label, spaced generously, no dividers |
A time or description on any item | Steps: the time small above a bold title, the description under it, dividers between steps |
Either layout can be split into sections with group. Sections appear in the order their first item does. The header shows the count ("1 of 8", or "3/14 packed" with countLabel) and a thin progress bar. Done items are struck through and muted.
Two kinds of history
A checklist is often used over hours, so there are two ways to restore it:
| Prop | Behavior | |
|---|---|---|
| Saved progress | onProgress → progress | Save the ticked IDs on every change and pass them back. The checklist stays editable, and nothing is sent to the agent |
| A submission | result | The user pressed the submit button. It restores the ticks and locks |
<Checklist
{...part.input}
progress={savedTicks}
onProgress={(ids) => saveTicks(part.toolCallId, ids)}
result={part.state === "output-available" ? part.output : undefined}
/>Installation
npx shadcn@latest add https://your-site.com/r/checklist.json
Usage
import { tool } from "ai"
import { checklistTool } from "@/components/genui/checklist.schema"
const tools = {
[checklistTool.name]: tool({
description: checklistTool.description,
inputSchema: checklistTool.inputSchema,
}),
}Without submitLabel the checklist is the whole answer, so give the tool an execute that returns immediately. With it, the agent receives:
{ action: "submit", checked: ["form", "passport", "photo", "fee"] }With LangGraph
Push it from a graph node with ui.push({ name: "show_checklist", props: { toolCallId, ...args } }, { message }), and render the thread's UI messages with the Renderer.
Schema
| Prop | Type | Notes |
|---|---|---|
title | string | |
items | Item[] | 2–20 |
ordered | boolean | Number the steps. Default false |
countLabel | string? | Word after the count: "packed" shows "3/14 packed". Default "3 of 14" |
submitLabel | string? | Adds a button that sends progress back |
Item
| Field | Type | Notes |
|---|---|---|
id | string | Returned in the result |
label | string | The step or thing. Bold in the steps layout |
time | string? | Shown small above the label, e.g. "12:30 PM". Up to 24 characters |
description | string? | One line under the label |
group | string? | Section heading |
meta | string? | Owner, shown on the right. Up to 24 characters |
checked | boolean? | Already done |
Host props: status (streaming, ready, submitted), onResult, onProgress, progress, result and className.