The final video in this batch brings the last two threads together, running the tool-calling agent from episode five through the API Management proxy introduced in episode four. The tricky part is correlation: since one agent interaction can trigger several separate calls to the model as it works through its tools, APIM is configured with W3C correlation properties and a custom header for the agent’s name, so all those calls can be grouped back together by operation ID in the logs. The result is a setup where you can query exactly how many model calls and tokens a single agent run consumed, which is essential once you’re running multiple agents through a shared, centrally governed model. The episode closes by teasing a comparison against the Foundry SDK-based agent framework in an upcoming video.
The code for this sample is here: https://github.com/michaelstephensonuk/azure-ai-samples/tree/main/06.helloworld.agent.via.api.management
