Lesson 1 of 2 Creating Agents in the Foundry Portal

Defining Agents with Foundry Agent Service

This lesson explains how an agent encapsulates a model's behaviour in instructions and gives it tools to retrieve information and take actions, and how Foundry Agent Service defines and runs agents.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the three core parts of an agent definition.
  • Distinguish knowledge tools from action tools.
  • Choose the tools an agent needs for a scenario.
  • Distinguish single-agent from multi-agent solutions.

What makes an agent

In Foundry Agent Service, an agent definition has three core parts. The model is a deployment that provides reasoning and language. The instructions describe the agent's role, goals, rules and boundaries, and are applied to every conversation, so client applications do not repeat them. The tools extend what the agent can do beyond generating text.

When a user sends a message, the agent's model decides whether to answer directly or to call one or more tools, uses the tool results and produces a response. Conversations store the messages and tool results so that each turn has the full context. Each saved change to an agent creates a new version, which allows changes to be tracked and rolled back.

The following diagram shows the parts of an agent definition and how a message is handled.

What makes an agent in Foundry Agent Service. The agent definition has three core parts: a model deployment for reasoning and language, instructions that set its role, goals and boundaries for every conversation, and tools that extend what it can do. When a message arrives, the model decides whether to answer directly or call tools, uses their results and replies. Conversations store messages and tool results, and every saved change creates a new version.
Model, instructions and tools are defined once, in Foundry.
True or false

Inside an agent

Exam skills 2.1.4

Check four statements about agents in Foundry Agent Service.

Log in to try this activity Interactive activities are free with an account.

Knowledge tools

Knowledge tools ground the agent's answers in data. File search indexes uploaded files, such as PDFs and Word documents, in a managed vector store and retrieves relevant passages, which suits a set of documents owned by the agent. Web search and Grounding with Bing Search retrieve current public information. Foundry IQ knowledge bases and the Azure AI Search tool connect agents to enterprise indexes that combine several data sources. Answers grounded by these tools can include citations.

Action tools

Action tools let the agent compute or change things. Code interpreter runs Python in a sandbox to perform calculations, analyze uploaded data files and create charts. Function tools describe functions in the client application with a name, description and JSON parameter schema; the agent asks the application to run them. OpenAPI tools call REST APIs described by an OpenAPI specification, and Model Context Protocol (MCP) tools connect to MCP servers that expose tools to many agents. Image generation is also available as a tool.

The following table recaps which tool fits common needs.

NeedTool
Answer from a set of uploaded documentsFile search
Answer with current public informationWeb search or Grounding with Bing Search
Calculate, analyze a CSV file or draw a chartCode interpreter
Call a function in the client applicationFunction tool
Call a REST API with an OpenAPI specificationOpenAPI tool
Use tools published on an MCP serverMCP tool
Sort into groups

Choose the tool

Exam skills 2.1.4

Choose the agent tool that each request needs.

Log in to try this activity Interactive activities are free with an account.

Single-agent and multi-agent solutions

A single-agent solution has one agent with the instructions and tools it needs for one role, such as a support agent with file search and an order-lookup function. This is the right starting point for most scenarios and is what AI-901 tests. Multi-agent solutions use workflows in which specialized agents hand over to each other, which helps when distinct roles need different tools or instructions.

Scenario questions

Design the agent

Exam skills 2.1.4

Choose the tool or design that each agent scenario needs.

Log in to try this activity Interactive activities are free with an account.
Worked example

Choosing tools

A finance team wants an agent that answers questions from the company's expense policy PDF and, when an employee uploads a spreadsheet of expenses, totals them by category and shows a chart. Which TWO tools should the agent have?

File search grounds answers in the policy PDF, and code interpreter totals the spreadsheet and draws the chart. Web search would bring in public information rather than the company's policy, and a function tool would require the team to write and host the calculation code themselves.

Check yourself

Which tool should an agent use for calculations and data analysis?

Show answer

The code interpreter tool. File search is for answering from uploaded documents.

Exam Tips

Remember for the exam

  • An agent is a model deployment plus instructions plus tools.
  • File search for uploaded documents; code interpreter for calculations and data analysis.
  • Function tools run in the client application; OpenAPI and MCP tools call external services.
  • Each saved change creates a new agent version.