What makes something an agent
Know this: The definition to memorise
An agent = a model (the reasoning engine) + instructions (who it is, what it may do) + tools (how it acts on the world). Remove the tools and you have a chatbot.
| Chat completion | Agent | |
|---|---|---|
| Input | A question | A goal |
| Process | One prompt, one answer | A loop of reasoning and tool calls |
| Can act on other systems | No | Yes, through tools |
| State | You manage the history | The service manages conversation state |
Check your understanding
What are the three building blocks of an AI agent?
Three agent types, plus one escape hatch
Changed: This terminology is new and very likely to be tested
Foundry Agent Service now offers prompt agents, voice-based prompt agents and hosted agents. If your notes only describe "creating an agent with instructions and tools" without naming the types, they predate this.
| Prompt agent | Voice-based prompt agent | Hosted agent | Responses API directly | |
|---|---|---|---|---|
| What you provide | Configuration: instructions, model, tools | The same, plus voice, audio and greeting settings | Your own code and framework | Your own code, running anywhere |
| Authoring surface | Portal, SDK or REST | Portal, SDK or REST | Agent Framework, LangGraph, OpenAI or Anthropic Agent SDKs, GitHub Copilot SDK, custom code | Any client |
| Runtime code to maintain | None | None - Voice Live runs the speech side | Yes - your agent logic | Yes |
| Compute to manage | None, fully managed | None, fully managed | Container compute, Foundry-managed | Yours |
| Agent resource in Foundry | Yes, named and versioned | Yes, named and versioned | Yes | No - the agent is ephemeral |
| Cost model | Inference + tool usage | Voice Live + model usage | Inference + tool usage + container compute | Inference + tool usage |
| Best for | Fast start, production agents with no custom orchestration | Real-time spoken conversations, call centres | Agents that call into your own code or custom orchestration | Code you already run elsewhere |
Every agent type gets a managed endpoint, automatic scaling, a Microsoft Entra identity, and access to Foundry models and platform tools. The differences are about who writes the runtime logic, who pays for compute, and whether people type or talk. A hosted agent ships as a container image or a .zip of source code that Foundry builds for you.
Check your understanding
Foundry Agent Service offers prompt agents, voice-based prompt agents and hosted agents. Which describes a prompt agent?
Check your understanding
Match each requirement to the way you should build the agent.
Drag each item into the row it belongs in, or select an item and then select the row. Each item may be used once, more than once, or not at all. Each correct selection is worth one point.
Best approach
Answer area
- Ship an internal assistant quickly with no runtime code to maintain
- Run custom orchestration logic written with LangGraph, with Foundry handling hosting and scaling
- Call Foundry models and tools from code you already run elsewhere, with no agent resource in Foundry
- Answer customer phone calls in real time, with no voice orchestration code to host
Tools and toolboxes
Tools are what let an agent do more than talk. Read the verbs in a scenario and the tool list writes itself.
| The scenario says… | Tool you need |
|---|---|
| "answer from our documents / policies / knowledge base" | File search or a knowledge tool (Foundry IQ) |
| "calculate", "analyse this spreadsheet", "produce a chart" | Code interpreter |
| "current", "today's", "latest news" | Web search |
| "create a ticket", "update the CRM", "place an order" | Custom function or OpenAPI tool |
| "remember what this user told us last week" | Memory (preview) |
| "use the tools another team already exposes" | An MCP server, or a toolbox |
| "reason over our Microsoft 365 content" | Work IQ (preview) |
| "reason over our Fabric data" | Fabric IQ (preview) |
Changed: Toolboxes
A toolbox curates a set of tools once - web search, file search, code interpreter, MCP servers, custom functions - and shares them across many agents through a single managed MCP endpoint with centralised authentication, governance and versioning. It is the governance answer to "every team configured their own tools differently".
Check your understanding
An agent must answer questions about company policy, run numerical calculations on an uploaded spreadsheet, and look up today's exchange rate.
Which combination of tools does it need?
Check your understanding
What is a Foundry toolbox?
Building and testing a single agent
In the Foundry portal
Name the agent
Pick carefully - the name cannot be changed later, and code refers to the agent as
<name>:<version>.Choose a model
Any supported model from the catalog. You can swap models later without changing your client code.
Write the instructions
This is the agent's system prompt: persona, scope, rules, and what to do when it is unsure.
Attach tools and knowledge
Enable code interpreter, file search, web search, or connect a Foundry IQ knowledge base.
Test in the playground
Chat with it, inspect the tool calls it makes, and iterate on the instructions until the behaviour is right.
Take the code
The playground's Code tab gives you a preconfigured snippet to drop into your application.
Publish when ready
Publish the agent version as an Agent Application with a stable endpoint, and optionally share it to Microsoft Teams and Microsoft 365 Copilot.
Check your understanding
Where do you test an agent interactively before wiring it into an application?
A client application for an agent
import os
from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import PromptAgentDefinition
from azure.identity import DefaultAzureCredential
# pip install "azure-ai-projects>=2.3.0" azure-identity
project = AIProjectClient(
endpoint=os.environ["PROJECT_ENDPOINT"],
credential=DefaultAzureCredential(),
)
# Define the agent in code - or create it in the portal and skip this step.
project.agents.create_version(
agent_name="triage-agent",
definition=PromptAgentDefinition(
model=os.environ["MODEL_DEPLOYMENT_NAME"],
instructions="You are a tier-1 support triage agent. Be concise.",
),
)
# An OpenAI client bound to the agent, and a conversation that keeps history.
openai = project.get_openai_client(agent_name="triage-agent")
conversation = openai.conversations.create()
response = openai.responses.create(
conversation=conversation.id,
input="A customer reports the app crashes on launch. What should I ask them?",
)
print(response.output_text)Changed: Threads and runs are the older API
Samples that call create_thread(), create_message() and create_and_process_run() against a connection string come from the earlier Assistants-style API and version 1.x of the SDK. The current pattern (version 2.x) uses a project endpoint, agent versions, conversations and the Responses API. You may be asked to recognise which is current.
Check your understanding
In the current Foundry SDK, what does a client application do to have a conversation with an existing prompt agent?
Check your understanding