Skip to content
satin

Agent plan

Pro

The steps an agent proposes before it acts: rename, reorder or remove some, then Run, and watch them tick off.

Schedule interviews for 3 shortlisted candidates

Installation

Terminal
npm i @uisatin/ui @uisatin/pro
Import
import '@uisatin/ui/styles.css'
import '@uisatin/pro/styles.css'
import { AgentPlan, type AgentPlanStep } from '@uisatin/pro/agent-plan'

Part of Satin Pro, the licensed edition: @uisatin/pro on top of @uisatin/ui at the same version, its stylesheet after Free's. Satin Pro isn't on npm yet.

About 6.0 kB of JavaScript, minified and gzipped, on top of the @uisatin/uicomponents it uses (React aside).

First time with Satin? Set it up once, styles and fonts included, with the installation guide.

API Reference

The AgentPlan component (Satin Pro, @uisatin/pro/agent-plan) is a role="group" card named by its title, around an ordered list of steps. Each step is { id, label, detail, tool, toolIcon, editable, skipped }. In a draft each step shows its number, its label, and under the label one muted line with its tool (the app’s logo from toolIcon, an img drawn at 16px or an iconoir icon, then the name) and detail. The number shows a grip on hover or keyboard focus: drag it, or press Alt+↑/↓, to reorder (onStepsChange); a dragged step lifts and the others make room. Pressing a step opens Rename and Remove under it, one step at a time; Rename turns the label into a field. Run plan, disabled while the plan is empty, calls onRun with the steps to run. The app then drives status and currentStep: steps before it are done, the current one shows AgentLoading, and a failed one shows error with Retry and Skip. Parts: AgentPlanRoot, AgentPlanHeader, AgentPlanSteps, AgentPlanActions.

PropTypeDefault
steps
AgentPlanStep[]
—
defaultSteps
AgentPlanStep[]
[]
onStepsChange
(steps: AgentPlanStep[]) => void
—
status
"draft""running""failed""done"
"draft"
currentStep
string
—
onRun
(steps: AgentPlanStep[]) => void
—
onStop
() => void
—
onRetry
(step: AgentPlanStep) => void
—
onSkip
(step: AgentPlanStep) => void
—
error
ReactNode
—
title
ReactNode
"Plan"
indicator
"tetris""flappy"
"tetris"
glimmer
"color""neutral"
"color"

Accessibility

A role="group" named by the title, around an ordered list named "Plan" (agentPlan in SatinLabels). In a draft each step the person can edit is one button, holding its label and its tool’s line, with aria-expanded and described as "Alt and arrow keys to move". Pressing it opens a row under it, which it controls, with Rename and "Remove <step>". A step the agent locked (editable: false) is plain text. Rename turns the label into a field named "Step 2". After a removal focus goes to the next step, or the one before when it was last, or the list when no step is left, and the live region says "<step> removed". The step’s number is hidden, since the list already gives the position, and dragging it is pointer-only: a pointer that can’t drag has no other way to reorder (see Known gaps). Once it runs, each step says where it is to screen readers ("Done", "In progress", "Not started", "Failed", "Skipped") beside its hidden icon, and the current one has aria-current="step"; the AgentLoading in it keeps quiet. One polite live region reads out a step finishing ("Find open slots, done"), a failure, the end ("3 steps done") and a step’s new place after a move. Retry is described by the error. When the focused button goes away (Run, Retry, Skip, Stop), focus moves to the list.

KeyAction
TabMoves through each step, Rename and Remove under the open one, then Run plan.
EnterorSpaceOn a step: opens or closes its Rename and Remove. On Rename: turns the label into a field. On Remove: removes the step.
Alt+↑orAlt+↓On a step, or on Rename or Remove under it: moves the step up or down and reads out its new place.
EnterIn the rename field: keeps the new name and returns to the step (an empty name keeps the old one). Leaving the field (Tab, or a click away) keeps the new name too.
EscIn the rename field: keeps the old name and returns to the step. On an open step or its Rename and Remove: closes them and returns to the step.