Skip to content
GitHub (opens in a new tab)

AgentSteering

Redirect, pause or stop an agent while it runs: a steer composer with quick steers, Pause / Resume and Stop with an optional AlertDialog confirm.

stableOrganismcontracts/agentsteering.json

Preview

AgentSteering

Redirect, pause or stop a running agent. Not DecisionCard. Not AgentPlan.

Master

Type a steer and press Enter. Pause, resume, or stop (confirmed in an AlertDialog).

Billing refactor

step 6 · editing invoice.ts

Running02:14
Finishes this step, then pauses

Usage

AgentSteering redirects a run in a sentence. Send is the one solid primary; Stop is outline danger and confirms in a kit AlertDialog when work can't be undone.

Do's

  • let the person redirect a running agent in a sentence
  • pause and resume a run, with a note
  • stop a run, confirming when work can't be undone

Don'ts

  • the agent asks a question — DecisionCard
  • editing steps before the run — AgentPlan
  • a chat thread — Chat
<AgentSteering
  name="Billing refactor"
  meta="step 6 · editing invoice.ts"
  elapsed="02:14"
  value={text}
  onValueChange={setText}
  onSteer={steer}
  suggestions={["Focus on refunds", "Skip the docs", "Smaller PRs"]}
  onPause={pause}
  pauseNote="Finishes this step, then pauses"
  onStop={stop}
  stopConfirm={{ title: "Stop this run?", description: "2 files are half-edited." }}
/>

When to use

  • let the person redirect a running agent in a sentence
  • pause and resume a run, with a note
  • stop a run, confirming when work can't be undone

When not to use

  • the agent asks a question — DecisionCard
  • editing steps before the run — AgentPlan
  • a chat thread — Chat

What an agent reads

import { AgentSteering } from "agentic-ds-kit";
must
  • section aria-labelledby the agent name
  • the composer is a form; the Input is named "Steer <name>"; the icon-only send Button is named
  • aria-busy while sending; the applied line is role=status; the error is a kit LoadError (role=alert)
  • Stop is outline danger, never the primary; a destructive stop confirms in a kit AlertDialog
  • quick steers are buttons that fill the composer
  • motion is opacity and transform, off under prefers-reduced-motion
defaults
  • status running
  • sendAppearance solid
  • sending false
  • loading false
stops if
  • Do not invent a local SteerBox, AgentControls, or RunControls
  • Stop is never the solid primary Button
  • Do not stop without AlertDialog when work can't be undone
  • Do not stop without stopConfirm when the agent can send messages
  • Do not use raw hex

From contracts/agentsteering.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
namestringYes——
metastringNo—e.g. "step 6 · editing invoice.ts".
statusrunning | paused | stopped | doneNorunningdone disables steering; stopped shows the stopped line and Open trail.
elapsedstringNo——
valuestringNo——
onValueChangefunctionNo—(value) => void. Quick steers fill the composer.
onSteerfunctionNo—(text) => void. The send button is the one solid primary; Enter sends.
sendAppearancesolid | softNosolidsoft when another solid primary shares the view (e.g. a Chat composer).
sendingbooleanNofalse—
appliedstringNo—Success line after a steer, e.g. "focus on refunds · 14:03".
errorstringNo——
onRetryfunctionNo——
suggestionsstring[]No—Quick steers: outline sm Buttons that fill the composer; they stay after a steer is applied.
onPausefunctionNo——
pauseNotestringNo—What Pause does, in a tooltip on Pause, e.g. "Finishes this step, then pauses". Also linked with aria-describedby, so screen readers hear it on focus.
onResumefunctionNo——
onStopfunctionNo——
stopConfirmobjectNo—{ title, description } opens a kit AlertDialog (Keep running / Stop run) before onStop.
stoppedNotestringNo——
onOpenTrailfunctionNo——
loadingbooleanNofalse—
  • Component
    →

    DecisionCard

    An agent presents a choice mid-run and waits: options with a recommended one, or a free-text answer.

  • Component
    →

    AgentPlan

    What an agent intends to do, before or during a run.

  • Component
    →

    Chat

    Assistant panel with a header, a thread, and a composer.

  • Component
    →

    AlertDialog

    Must-choose overlay that interrupts until the user cancels or confirms.