Skip to content

Agent steps

Shows the steps of an agent run and the status of each step.

Checking the documentation, In progress

  1. Searched the component pages, Done

    Found 3 matches

  2. Reading the disclosure guide, In progress

  3. Write the answer, Not started

agent-steps-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Usage

research-run.tsx

Composition

  • AgentSteps

    Owns the open state. Its label is the summary that stays visible when the steps are closed.

    • AgentStepRepeats

Auto collapse

Use autoCollapse to close the steps when the run ends and open them when a new run starts. Also install Button.

Checking the invoice, In progress

  1. Read the invoice, In progress

  2. Match the purchase order, Not started

  3. Check totals, Not started

agent-steps-auto-collapse-demo.tsx

Step content

Children of AgentStep show below its title, for example sources or a ToolCall. Also install Badge and Tool call.

Researched in 2 steps, Done

  1. Searched the web, Done

    react-spectrum.adobe.comdeveloper.mozilla.org
  2. Ran a query, Done

agent-steps-content-demo.tsx

Stopped and failed

Run stopped, Stopped

  1. Read the invoice, Done

  2. Match the purchase order, Stopped

    Stopped by you

Run failed, Failed

  1. Read the invoice, Done

  2. Match the purchase order, Failed

    PO-4471 was not found

agent-steps-states-demo.tsx

API reference

AgentSteps

status: "running" | "complete" | "stopped" | "error"Required
The status of the run.
label: stringRequired
The summary of the run. Screen readers announce changes with the status.
detail: string
Text after the label, for example the step count.
autoCollapse: boolean = false
Closes the steps when the run ends and opens them when it starts again.

AgentStep

title: stringRequired
What the agent did or does in this step.
status: "pending" | "running" | "complete" | "stopped" | "error" = "complete"
The status of the step.
description: ReactNode
Text below the title.