Skip to main content

Azure AI Foundry is an Azure service where you can create agents using various LLMs (including your own). In this post we will look at how to create an agent in Azure AI Foundry that can call actions.

Let’s head to Azure AI Foundry to create our agent. AI Foundry is accessible at https://ai.azure.com, however if you don’t have an AI Foundry resource created you may run into the error “Selected user account does not exist in tenant” when logging in.

If you don’t have a resource created, go to https://portal.azure.com and search for Azure AI Foundry (type into the search box or click on the icon if it is there).

Create a new Azure AI Foundry resource:

Enter the information above, follow the steps to create your first resource.

Once created, you should be able to access the https://ai.azure.com site:

Once inside, the Model Catalog displays the many models available for you to use.

Let’s create an agent by selecting Agents, then we can choose our model. I will select gpt-4.1. Note, Azure AI Foundry has premium AI models that you can use, such as from OpenAI, Meta, Deepseek, etc. You can also bring your own models to run on the Azure infrastructure:

Select the deployment name and type and click Deploy

Note the deployment types available:

From here I can see my new agent. We can test it by clicking on Try in playground:

Here we can play with the agent. For example, if we type in “Hello!” we get a response:

Clicking on Thread Logs gives us more information on the interactions:

Let’s add some knowledge to this agent. Click on Knowledge->Add:

We can see the various Knowledge sources available, such as Azure AI Search, Bing Search, SharePoint, Fabric, etc:

We will choose Files and upload a file that contains the following customer data:

Click Upload and Save:

Now when we ask the Agent a question related to the data we get a response back:

Zooming over the citation we see the data:

Now this is where the agent’s instructions are important. Let’s expand our agent to perform an action which will invoke an HTTP request when I have tickets to a sports event in a particular city. We will tell the agent to do this:

“You are an agent that knows about where customers live and their favorite sports. If I have tickets available to a sports event in a city where the customer lives, send them the tickets.”

Now let’s add an action so our agent of calling an HTTP method. Go to Actions and click Add:

Note the various options. In our case we will select Azure Logic Apps:

And we call an HTTP endpoint. Provide the name and description:

We will select to POST to the endpoint:

Click Next:

Let’s add a description on how to invoke the tool: “When I have tickets available to a sports game in a city that is the favorite sport of a customer living there, run this tool” and click Create:

At this point, the logic app is created in Azure:

Clicking Edit we can see the workflow created:

For simplicity of this demo we will remove the HTTP request and just watch the endpoint become invoked:

Let’s test our agent. We will ask some opening questions:

And then say that we have tickets available:

When we view the Run Info we see the Logic Apps tool is invoked:

And on the Azure side our run has been completed:

That’s it, we have now created an agent in Azure AI Foundry that can perform an action.

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.

 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET’S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

ABOUT CARL DE SOUZA

Source