Question 3 of 5

How can you stop an agent that keeps going in circles?

A helper cannot locate an allowed document and keeps searching for it. How many attempts should it get, and what should the user see?

An assistant looks up order 42 and gets “not found”. Sending 42 to the same catalogue again adds a log entry but yields no new information if the catalogue has not changed. At that point, asking the customer to check the number is more useful than repeating the lookup.

WHERE TO START

How could the assistant notice it is attempting the same action for the third time?

What to know before this question
Topic example · Permission for an action

Try the close_ticket action and check whether it is on the list.

allowed = {"read_ticket"}
action = "read_ticket"
print(action in allowed)
Line notes
  1. Store the action available to the assistant.
  2. Choose an action to check.
  3. Print whether the action is allowed.

How would you rate your understanding?

This is your self-assessment. Progress is saved in this browser.

Not rated yet

← Back to Tools, agents and MCP