Implement a tool-calling loop with retries, timeouts, and error handling

Agents, Tool Use & Product Post-Training3 / 7

Chapter 193 / 7

Agents, Tool Use & Product Post-Training

Implement a tool-calling loop with retries, timeouts, and error handling

Medium
Target interface
run_agent(model, tools, user_goal, max_steps=10, max_retries=2, timeout_s=5.0)

Implement the function/class skeleton in the editor. Any correct approach is accepted.

Hints0 / 2
Reference solution
Your own code stays in the editor.