Lab 6A · First agent

Write the
agent loop.

Build a teaching assistant agent that reasons, chooses a tool, observes the result, and continues until it can answer.

What you will do

Set the system instructions, define the tools, call the model, parse its tool choice, execute the function, append the observation, and repeat with a bounded iteration count.