Skip to content

Exercise 03 — Tool-Calling Agent

Timebox: 45 minutes

Goal

Turn agent.py into a small tool-using agent that can call tools, stop cleanly, and explain its answer.

Work in

  • agent.py

Tasks

  1. Keep at least two tools working end-to-end.
  2. Add an iteration cap so the agent cannot loop forever.
  3. Log tool calls clearly.
  4. Add a third tool or a better planner.
  5. Upgrade the mock planner to a framework-driven or provider-driven version if you want the real interview shape.

Done when

  • The agent calls tools when needed
  • It stops with a final answer
  • It does not spin forever on failures