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
- Before the click,
#stepshas no items - After the run there is one item per tool call, in order
#answershows the closing sentence- 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.