BuildMidData / MLAuto-graded
Make an agent call tools until it answers
Checks understanding of how an AI assistant picks a tool, uses what comes back, and knows it is finished.Every tool-using agent runs the same fundamental loop: ask the model what to do next, do it, feed the result back, repeat until the model says it is finished. That loop is the difference between a model that talks and one that acts. The version inagent.py is broken. Make run_agent dispatch tools correctly, feed results back, return the model's final text exactly, and stay bounded when the model never stops.30 min
python
You're done when
- A run using several tools completes without crashing.
- Tools are dispatched in the right order with the right arguments.
- Each tool's result is fed back into the next model turn.
- The final answer returned is exactly the model's final text, unmodified.
- The loop terminates once the final answer arrives instead of continuing.
- A response that is final immediately, with no tool calls, is handled.
- A model that never finishes stops safely at the maximum iteration count.
What it measures
Agent engineeringImplementing the act-observe loop that turns a model into something that can do work.
Context engineeringFeeding tool results back so each turn builds on the last, in the form the model expects.
Bounded autonomyTerminating correctly on success and safely on runaway, which is what makes the loop shippable.
Your environment
Terminal + editorA full shell in the browser
Claude CodePre-authenticated, no key setup
Isolated microVMYours alone, wiped afterwards
Start this lab
30 min
Start labYou'll sign in to Anthropos to start. The lab opens in a private cloud workspace with Claude Code ready to use.AI Labs is part of Anthropos Workforce. Not on your plan yet? Book a demo