Create An Agent Using Microsoft Foundry (Azure AI).





 Create An Agent Using Microsoft Foundry (Azure AI).

When the world had the breakthrough in LLM, the next logical thought was, if LLM can generate and understand natural language, why not take it further to perform action and automate processes? Then Agentic AI was born. In a short form we can say Agentic AI = LLM + Perform Action.

We have agents for doing several automation and processes, but what truly makes an agent an AI agent or Agentic AI? An agent is an AI agent because it can understand natural language and act accordingly, especially in an orchestrated manner.

An agentic AI comprises of:

  • A large language model: This is the agent's brain; using generative AI for language understanding and reasoning.
  • Instructions: A system prompt that defines the agent’s role and behavior. Think of it as the agent’s job description.
  • Tools: These are what the agent uses to interact with the world. Tools can include: Knowledge tools that provide access to information, like search engines or databases. Action tools that enable the agent to perform tasks, such as sending emails, updating calendars, or controlling devices.

In terms of Agentic AI architecture, you can have a super-agent doing everything or you can have several agents working together. Tasks are broken down into smaller bits and assigned to each agent. They all work together to perform the tasks assigned to them; the flow of execution is managed by an agent orchestrator (Multi-Agent System).

There are several ways to create an Agents, several tools exist. However, this article will be limited to Microsoft Ecosystem, especially Microsoft Azure. In Microsoft ecosystem, there are several ways to create or author an agent: M365 Copilot, Copilot studio and Microsoft Foundry (Azure AI). Personally, I prefer Microsoft Foundry due to its rich capabilities: Foundry tools, Agents Orchestration, governance and security. Perfect for any serious enterprise grade solution.

Creating an Agent using Microsoft Foundry

1.   Prerequisites: Azure subscription with credits.

To setup Microsoft foundry, you will need to setup a project and create a resource in the project. If you have plans of creating several projects, you will need to create a hub. See more details here: Get started with Foundry - Training | Microsoft Learn

Task: To create an HR assistant agent that can help employees with questions about the organisational policies. The data source of the Agentic AI will be grounded to only the polices of the organisation. The beauty of grounding is to prevent hallucinations and to get precise and concise responses.

The data source will be some uploaded policy files of the organisation: Employee handbook, Benefit options, Role library.

Note: You can do something similar with Azure Bot Service for Knowledge base, FAQs but the responses will be guided; it´s not as smooth and direct as what an agentic AI would produce.

1.   Login to https://ai.azure.com. If you have your environment set up already (see the prerequisite section). Proceed to step 2.

2.  Create a new Agent.

Click on Agents on the left side bar, then click on create an agent.

Article content

3.    Configure the Agent:

a.    Enter the Agent name.

b.   Leave the Agent ID as-is.

c.    Select the model for Deployment(LLM model), it´s the agent´s brain for perceiving and thinking.

d.   Input the instructions. The instruction includes the agent´s role play, what to do and how to do it.

Article content

4.    Add the Knowledge Source.

Since we are grounding our data to just the organisation policies, we will upload the relevant files.

Article content

There are several grounded data sources you can use, depending on your use case. For this article, I will use files.

Article content

If you want the agents to call external services or applications or MCP, you will need to achieve that using the tools option. If you want to set up a multi-agent architecture, you will need to use the connected agent’s option.

Article content


5.   Test your agent.

You can now test the agent. You should have something like this.

Article content

To test your agent, click on the try it playground.

Article content
Article content


The agent responds with grounded data and references.

In the next article, we will use this scenario to demonstrate a multi-agent system. I will try to keep it as simple as possible.

Comments

Popular posts from this blog

Ledger Dimension Facade Class

Integration Capabilities and Support in Microsoft Dynamics 365 Finance & Operations (F&O) - An Overview

Performance and Monitoring in dynamics 365 F&O.