Command Palette

Search for a command to run...

Hectal
Phase 14: Agents in the UI
AI Frontend · Exercise 1 of 5Next
Intermediate

List the Steps of a Run

The route /api/agent runs an agent with three tools. When #start is clicked, send the message Refund ORD-1042.

Show one <li> in the list #steps for each tool part of the assistant message. Write it as toolName: outcome, where the outcome is done for output-available, failed for output-error, and running for anything else. Put the agent's closing text in #answer.

What Check tests

  1. Before the click, #steps has no items
  2. After the run there is one item per tool call, in order
  3. #answer shows the closing sentence
  4. Each item has a key from the tool call

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.