Single-agent solutions and agent client apps: AI-901 study notes and practice questions
What to know about Single-agent solutions and agent client apps for the AI-901 exam, from the Implement AI solutions by using Microsoft Foundry domain (58% of the exam guide), then 5 free questions to test it. Part of the AI-901 study guide.
An agent is a model plus instructions plus tools. Foundry Agent Service is the managed platform for building, running and publishing them.
Agent types
Type
What it is
Prompt agent
Defined by configuration only: instructions, a model and tools
Voice-based prompt agent
A prompt agent that talks through Azure Speech Voice Live
Hosted agent
Your own code in a container, run behind a managed endpoint with its own Microsoft Entra agent identity
An agent defined only in your app code through the Responses API is an “ephemeral agent”: nothing is created in Foundry.
Tools
Built-in tools include web search, file search, code interpreter and memory. Custom tools include your own functions, OpenAPI tools and MCP servers. A toolbox is a reusable group of tools behind one MCP-compatible endpoint. Foundry IQ is how a lab connects an agent to knowledge. Publishing an agent gives it a stable endpoint, and it can be shared through channels such as Teams and Microsoft Copilot.
The SDK flow
Connect with AIProjectClient and DefaultAzureCredential.
Create the agent with project.agents.create_version(agent_name=..., definition=PromptAgentDefinition(model=..., instructions=...)).
Get a client for it with project.get_openai_client(agent_name=...).
Start a chat with openai.conversations.create().
Send messages with openai.responses.create(conversation=conversation.id, input=...), reusing the conversation ID for follow-ups, and read response.output_text.
In the portal you can do the same through the playground: add instructions and tools, Save as agent, test in the Chat tab, and Publish to a preview web app.
How to choose
No code, just instructions and tools points to a prompt agent.
Custom logic in your own container points to a hosted agent.
Spoken conversation points to a voice-based agent.
Common traps
Old threads and runs patterns. The current flow uses conversations and responses.
Key authentication for agents. Agents need Entra ID.
Agent versus model. A model only generates. An agent adds instructions and tools and can act.
A furniture retailer wants a shopping-help agent that answers product and delivery questions. The team does not want custom code in a container, and it wants the agent saved in Foundry under a stable name.
The developer will define the agent in Python.
Which two settings in the agent definition shape its behavior? (Choose two.)
Choose two answers.
AA. A Dockerfile and container image that hold the agent's Python code
BB. The model deployment name the agent should call
CC. A fixed list of Azure Speech voices used to read every reply aloud
DD. Instructions text that describes the agent's role, scope and tone
EE. A conversation ID created before the first agent version is defined
Show the answer and explanation
Answers: B, D
A. Wrong: A Dockerfile and container image belong to hosted agents, where your code runs in a container. A prompt agent needs no container, so this setting does not apply here.
B. Right: Correct. The model deployment name tells the agent which model in the project to call. A prompt agent definition is built from that deployment and its instructions.
C. Wrong: Voices matter for voice-based agents, not for a text shopping-help agent, so this setting does not shape its behavior here.
D. Right: Correct. The instructions tell the agent its role, scope and tone, which is what the retailer wants to set. They are part of the agent definition sent to Foundry.
E. Wrong: A conversation holds the messages of one chat and is created separately from the agent definition. It does not define how the agent behaves.
Explanation
A prompt agent is defined by a model deployment and its instructions, with no custom container. Conversations hold chat history and are created separately. Voices and containers belong to other agent types.
A pediatric clinic wants an agent that runs custom Python appointment-rule logic in a container its developers package. Each agent instance needs its own Microsoft Entra agent identity, and Foundry should provide the managed endpoint.
Which type of agent in Foundry Agent Service meets these requirements?
Choose one answer.
AA. Prompt agent, defined only by a model and instructions, with no custom code or container
BB. Ephemeral agent, built only with the Responses API from the clinic's own application code
CC. Hosted agent, which runs the developer's own container code with its own Entra identity
DD. Voice-based prompt agent, which handles spoken conversation through Voice Live
Show the answer and explanation
Answer: C
A. Wrong: A prompt agent is configured with a model and instructions, so it cannot run the clinic's custom Python logic. It suits configuration-only agents.
B. Wrong: An ephemeral agent lives in the app's code. Nothing is created in Foundry, so the clinic would get no managed endpoint or dedicated agent identity.
D. Wrong: A voice-based prompt agent is built for spoken conversation through Voice Live. It does not run the clinic's own container code.
Explanation
Hosted agents are the type that runs your own code in a container while Foundry manages the endpoint and gives the agent its own Entra identity. Prompt agents are configuration only, and ephemeral agents are not saved in Foundry.
A school district is building a homework-help agent with Foundry Agent Service. The developer's notes describe how the agent keeps a chat going across several turns and how staff can reach it.
Which of these statements about agents and conversations are true?
For each statement, choose Yes if the statement is true. Otherwise, choose No.
AA. Follow-up requests that reuse one conversation ID let the agent see the earlier turns of that chat.
BB. A published prompt agent gets a stable endpoint that can be shared, for example through Microsoft Teams.
CC. Each follow-up turn must recreate the agent with create_version, or the agent forgets its instructions.
Show the answer and explanation
A. Yes. Yes. Follow-up turns that reuse the same conversation ID give the agent the history of that chat, so it can answer in context.
B. Yes. Yes. Publishing gives the agent a stable endpoint, and the published agent can be shared through channels such as Microsoft Teams.
C. No. No. An agent version keeps its instructions after it is created, so follow-up turns in a conversation do not need the agent to be created again.
Explanation
Reusing a conversation ID keeps the chat history for the agent, and publishing gives a stable, shareable endpoint. Agent instructions persist in the agent version, so recreating the agent every turn is not needed.
A garden-supply retailer's agent must say whether an item is in stock at a particular store. Stock levels live in the retailer's own inventory service, which has a REST API described by an OpenAPI file.
The agent should call that live API during the conversation, not guess from older text.
Which tool should the developer add?
Choose one answer.
AA. An OpenAPI tool that points to the inventory service's API description
BB. A web search tool, so the agent checks the retailer's public product pages for stock
CC. A file search tool, with last month's stock spreadsheet uploaded to the project
DD. A code interpreter, so the agent writes Python that queries the store's database directly
B. Wrong: Web search reads public pages, not the retailer's own inventory API, so it cannot give live store-level stock.
C. Wrong: File search answers from uploaded documents, which here would hold last month's data. Stale files would give out-of-date answers, so the requirement fails.
D. Wrong: Code interpreter runs code in a sandbox for calculation and file analysis. It is not the way to call a documented REST API.
Explanation
Custom tools such as OpenAPI tools let an agent call a documented API during a conversation. The built-in tools cover public web pages, uploaded files and sandboxed calculation, which do not give live inventory.
A hotel group has built an agent for its operations staff in Foundry Agent Service. Each request below needs a different built-in tool.
Match each request to the tool that fits it best.
Match each item to one answer. An answer can be used more than once, and some may not be used.
Items
Answer staff questions from the group's 60-page housekeeping policy, which was uploaded as a PDF.
Total each month's room revenue from an uploaded spreadsheet export of bookings.
Check the current opening hours of a local museum that guests often ask about, from its public website.
Answers
AA. Web search tool
BB. File search tool
CC. Code interpreter tool
DD. The memory tool
Show the answer and explanation
Correct matches
Answer staff questions from the group's 60-page housekeeping policy, which was uploaded as a PDF.: B. File search tool
Total each month's room revenue from an uploaded spreadsheet export of bookings.: C. Code interpreter tool
Check the current opening hours of a local museum that guests often ask about, from its public website.: A. Web search tool
About each answer
A. Web search reads current public pages, so it fits questions that depend on information published on the web, such as a museum's opening hours.
B. File search answers questions from documents uploaded to the agent, such as a policy PDF. It searches the files rather than calculating totals or reading websites.
C. Code interpreter runs Python in a sandbox, which suits calculations on uploaded data such as spreadsheet exports. It does not search policy documents or public pages.
D. Memory keeps useful facts about a user across sessions. It does not read an uploaded policy, total a spreadsheet or check a public website.
Explanation
Each request maps to the built-in tool that works on its source: uploaded policy files go to file search, uploaded data for calculation goes to code interpreter, and live public pages go to web search. Memory stores facts across sessions instead.
Want more on Single-agent solutions and agent client apps? The 5 full-length practice sets have 25 more Single-agent solutions and agent client apps questions, 225 in all, none of them in the free exam. One payment of $9.99 $6.99, no subscription. Get the practice sets →
Study Single-agent solutions and agent client apps