Agent status

What an AI agent is doing right now, in one line: "Searching the workspace · refund policy, 3 of 7, 14s, Stop". A pill, a row, or inline in a sentence.

Agent status

No script. The server renders the status and the label; a re-render changes them, and a screen reader hears the new label once.

Use it

<x-ds::agent-status label="Searching the workspace" detail="refund policy" :elapsed="$run->elapsed" :steps="[3, 7]"
    :cancelHref="route('runs.stop', $run)" />

As a row, or in a sentence:

<x-ds::agent-status variant="row" status="waiting" label="Waiting for your approval" detail="Send a refund confirmation" />

<p>Inbox: <x-ds::agent-status variant="inline" label="Drafting a reply" /></p>

Stop as a button or a form, in place of the link:

<x-ds::agent-status label="Searching">
    <x-slot:cancel><x-ds::button size="sm" variant="ghost" icon="stop" wire:click="stop">Stop</x-ds::button></x-slot:cancel>
</x-ds::agent-status>

Props

PropTypeDefaultWhat it does
statusstringrunningpending running done failed cancelled waiting. See the status set.
labelstringthe status's wordWhat it is doing, in a few words. Shimmers while running.
detailstring—A quieter second part: the file, the query, the reason it stopped.
elapsednumber—Seconds so far, as the server counted them: "14s", "1m 4s". Shown, never announced.
variantpill row inlinepillIts shape.
toneneutral accent success warning dangerthe status'sThe mark's colour, in place of the status's own.
cancelHrefstring—A Stop link, shown while it is still going (pending, running or waiting).
cancelLabelstringStopThe Stop link's words.
stepsstring or [current, total]—How far along: "3 of 7".
stepsTextstring:current of :totalThe words for an array steps.
statusTextarray—[status => words], replacing any of the English words below.
SlotWhat it does
cancelA button or a form in place of the Stop link. Shown only while it is still going.

The status set

Every agent component (reasoning, this one, tool call, agent plan, agent timeline) takes the same six statuses, drawn the same way:

StatusMeansMarkWords
pendingnot startedoutlined ellipsis, greyPending
runningunder waya spinner, accentIn progress
donefinisheda filled tick, greenDone
failedfinished badlya filled ✕, redFailed
cancelledstopped before the endan outlined ⊘, greyCancelled
waitingneeds the reader: an approval, an answera filled hand, amberWaiting for you

The spellings frameworks use are taken too (in_progress, completed, succeeded, error, canceled, requires_action…), and a backed enum. Anything else draws as pending. The status is always written, visibly or for screen readers, never left to colour.

A mark that changes on a re-render grows in, motion-safe, from CSS alone.

Accessibility

  • The words are a polite, atomic status region: a new label, detail or steps is read once, whole.
  • The elapsed time sits outside it and is hidden from assistive technology, with a text form for reading: a re-render that only moves the clock says nothing.
  • Stop is outside the region too. Tab reaches it; it draws the focus ring.

Don't

  • Don't render it only once the agent starts. Render it from the start, pending, so the status region exists before its words change.
  • Don't tick the elapsed time every second from the server just to move the number. It is fine as it is re-rendered for other reasons; it does not announce either way.

From the package repo: edit this page on GitHub.

Was this page helpful?