Skip to content

Checkpoint

Premium

An agent checkpoint card that pauses for a decision on a question, command or plan, then collapses into a one-line receipt with undo, edit-before-allow and a risk grade.

AI Agent UIAI coding agentsChat assistantsAutomation approvals
Needs your OKwrites

Verifies the change compiles before I open the PR.

Examples

Questions and custom answers
Two things before I migrateQuestion 1 of 2

Which environment should the migration run against first, given that staging was refreshed from production last night?

Destructive command
Delete build outputsdestructive

The cache holds artifacts from an older compiler, which break incremental builds.

Seven-step plan
Plan for the date bug7 steps
No steps yet
Nothing to approve

Add to your projectPremium component

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/••••••••••••
2

For dark mode, add the dark class to your <html> element:

Optional
<html class="dark">

Install with AI Canvas MCP

With AI Canvas MCP, your AI knows every component we ship. Ask for one inside Claude Code, Codex, or Cursor and it installs the component you pick. Works with any AI Canvas account, free or premium.

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

CheckpointQuestion

PropTypeDefaultDescription
promptreqstring-The question shown in 14px 600.
optionsreqstring[]-Up to three option chips; keys 1 to 3 pick them.
allowCustombooleantrueAdds a "Something else" chip that reveals a text input.

AgentCheckpoint

PropTypeDefaultDescription
mode'question'|'command'|'plan'-Which decision the card asks for. Left out, it follows the data: questions, then steps, else command. With no data props at all the card plays its demo, with a mode switch above it.
titlestring-Header title next to the fingerprint mark.
questionsCheckpointQuestion[]-Questions asked one at a time in question mode.
commandstring-Shell command shown in command mode; editable inline, the edited text is what gets approved. A new value starts a new request.
cwdstring-Working directory shown on the first line of the command box.
risk'read'|'writes'|'destructive'-Risk grade chip; destructive turns the approve button red and requires two presses.
whystring-One-sentence reason shown under the command.
stepsstring[]-Plan steps; each can be struck out before confirming.
autoApproveSecondsnumber-Draws a ring around the approve button that approves with reason 'timeout' when it completes; pauses while the card is hovered or focused. Left out or 0, nothing auto-approves; ignored when risk is destructive.
labels{approve?: string, reject?: string}-Overrides the approve and reject button labels in every mode.
onApprove(payload: CheckpointPayload & {reason: 'user'|'timeout'}) => void-Receives exactly what the user agreed to: the edited command, the kept steps, or the answers.
onReject(reason: 'user'|'skip') => void-Called on reject (or skip in question mode). Passing onApprove, onReject or onUndo disables the demo auto-reset and demo auto-approve.
onUndo() => void-Called when the user undoes a decision. Left out in host use, no Undo is offered.
requestIdstring-Give each ask its own id; a new id reopens a decided card even when the text is identical.
classNamestring-Extra classes merged onto the outermost root element.
tuningPartial<CheckpointTuning>-Overrides any number in CHECKPOINT_TUNING (timings, sizes, springs); keys left out keep their defaults.

About Checkpoint

Checkpoint is the card an agent shows when it has to stop and ask before it continues: answer a short question, allow a shell command, or confirm a plan. The command can be edited in place before it is allowed, plan steps can be struck out, and the callback receives exactly what the user agreed to. A risk chip grades the command as read, writes or destructive, and a destructive command turns the button red and asks for a second press. An optional auto-allow ring runs around the button and pauses while the pointer or focus is inside the card. After the decision the card folds into a one-line receipt with a five second undo, so the conversation stays readable. Every prop is optional and the defaults reproduce the preview, with full keyboard control, reduced motion support and a matching light theme.

Built with

MotionTailwind CSS

Frequently asked questions

Is Checkpoint free to use?
Checkpoint is a Premium AI Canvas component. Premium unlocks the full source code, the full remix prompt, and one-command installs for every Premium component, block, and template.
How do I install Checkpoint?
Premium unlocks one-command installs: run the shadcn CLI with your AI Canvas token, or connect the AI Canvas MCP server and ask your AI editor to install it for you. Premium also unlocks the full remix prompt in the Remix panel.
What is Checkpoint built with?
Checkpoint is built with React and TypeScript, using Motion and Tailwind CSS. It ships with both light and dark styling.
Where would I use Checkpoint?
Common uses include AI coding agents, Chat assistants, and Automation approvals. Like every AI Canvas component, it is self-contained and drops into any React project.
Can I remix Checkpoint with AI?
Yes. Open "Remix with AI" on this page to read the setup and the constants Checkpoint is built from. The engine, the markup and the notes on how it works are part of Premium. For the exact component, install it with the one-command CLI.

Featured in collections

More like this