Introduction to Building Agent Client Applications
Calling a Foundry agent from a Python application with the Foundry SDK, holding multi-turn conversations and handling the output and function calls an agent returns.
- 2 lessons
- Module quiz
Once an agent exists in Foundry, any application can use it. A Python client needs only the project endpoint and the agent's name: get_openai_client(agent_name=...) returns a client bound to the agent, which already has its model, instructions and tools.
The client holds a conversation so that follow-up questions keep their context, reads the response's output items to see which tools were used, and completes function calls, because function tools run in the client's own code.
What the exam expects
Questions test binding a client to an agent, keeping context with a conversation, the difference between built-in tools, which run in Foundry, and function tools, which run in the client, returning function results with the same call ID, and validating function arguments.
How this module is organized
Calling a Foundry Agent from a Python Client explains how a client connects and converses with an agent, and Handling Agent Responses and Completing Function Calls explains output items and function calls.