Agentic control
Plan preview
Use when the agent is about to take several steps the user has not seen yet.
The agent states its plan in plain language. Proceed, edit, or take over.
Part of Agentic control. The stage where the agent stops answering and starts doing. It covers the whole handover: agreeing what the agent may do, watching it work, stepping in, and checking what changed afterwards. Reach for these as soon as an action touches a customer, money or a record.
Do
- Write each step as a plain sentence with real numbers, such as which tickets, which customer, how much.
- Let people drop a step before the run starts, and run only the steps they kept.
- End on a receipt, so the finished plan links to evidence of what happened.
Don't
- Don't start any step before Proceed. The subtitle promises nothing runs until the user says so.
- Don't show a plan for a single reversible action. Do it and show a receipt.
- Don't treat "I'll do it myself" as a failure. The agent stands by, it does not argue.
States
- Proposed: Numbered steps with a Proposed badge and three actions: proceed, edit the plan, or do it yourself.
- Editing: Each step gains a remove control. Dropped steps are struck through and can be restored. A count shows how many steps are kept, and Lock plan returns to the proposal.
- Executing: The badge pulses, steps check off one by one, and a line counts progress, such as 2 of 4.
- Done: Every kept step is checked. The footer reports how many actions were taken and links to the receipt.
- Handed off: The card collapses to one quiet line saying the plan was handed back and the agent is standing by.
Usage
import { PlanPreviewPattern } from "./halaska-kit";
<PlanPreviewPattern
title="Alpha wants to clear the support backlog"
steps={[
"Reply to the 14 password reset tickets with the runbook answer",
"Issue a $180 credit to Acme for Tuesday's outage",
"File one Linear issue for the calendar sync bug",
]}
onProceed={(steps) => runPlan(steps)}
onHandoff={() => assignToMe()}
/>
PlanPreviewPattern props
titlestring(default "Alpha wants to clear the support backlog"): Card headline (default: "Alpha wants to clear the support backlog")subtitlestring(default "Nothing runs until you say so."): Line under the headline while reviewing (default: "Nothing runs until you say so.")stepsstring[](default PLANPREV_STEPS): Plain-language steps, shown numbered; copied into state on mount so edits never mutate the propbadgeLabelstring(default "Proposed"): Status badge text in the review/edit phases (default: "Proposed")proceedLabelstring(default "Proceed"): Primary action label (default: "Proceed")editLabelstring(default "Edit plan"): Secondary action label (default: "Edit plan")handoffLabelstring(default "I'll do it myself"): Ghost action label that hands the plan back to the user (default: "I'll do it myself")lockLabelstring(default "Lock plan"): Label of the button that locks an edited plan (default: "Lock plan")doneTextstring | (count: number) => string: Footer text once every step has run; default renders "Done · N actions taken · view receipt"handoffTextstring(default "Plan handed off. Alpha is standing by."): Line shown after the user takes the plan over (default: "Plan handed off. Alpha is standing by.")stepDelayMsnumber(default 700): Interval between steps checking off while executing (default: 700)onProceed(steps: string[]) => void: Fires when Proceed is clicked, with the kept (possibly edited) stepsonComplete(steps: string[]) => void: Fires when the last kept step checks offonEdit(steps: string[]) => void: Fires when the plan is locked after editing, with the kept stepsonHandoff() => void: Fires when the user chooses to do it themselves
Built from
Agent Glyph, Badge, Button, Card, Label, Stack, Thinking Indicator, Typography
Related patterns
Halaska UI · Components · Patterns · Screens · Install