Checklist

Steps the user carries out over time, checked off as they go.

Pattern

≈ 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 packed

Clothing

Shoes and accessories

Toiletries

When 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-line description.
  • For a list of things, use short labels only, and split long lists with group ("Clothing", "Toiletries").
  • Set countLabel when a word makes the count clearer: "packed" shows "3/14 packed".
  • Use meta only for an owner ("IT"), in a few words.
  • Only add submitLabel when 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 haveLayout
Labels onlyRows: a round check and the label, spaced generously, no dividers
A time or description on any itemSteps: 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:

PropBehavior
Saved progressonProgress → progressSave the ticked IDs on every change and pass them back. The checklist stays editable, and nothing is sent to the agent
A submissionresultThe 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

app/api/chat/route.ts
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

PropTypeNotes
titlestring
itemsItem[]2–20
orderedbooleanNumber the steps. Default false
countLabelstring?Word after the count: "packed" shows "3/14 packed". Default "3 of 14"
submitLabelstring?Adds a button that sends progress back

Item

FieldTypeNotes
idstringReturned in the result
labelstringThe step or thing. Bold in the steps layout
timestring?Shown small above the label, e.g. "12:30 PM". Up to 24 characters
descriptionstring?One line under the label
groupstring?Section heading
metastring?Owner, shown on the right. Up to 24 characters
checkedboolean?Already done

Host props: status (streaming, ready, submitted), onResult, onProgress, progress, result and className.

Source

On this page