The Azure Logic Apps team announced that Azure Logic Apps Agent Loop is now available for use. This functionality is a game changer for Azure Logic Apps as it provides developers with the ability to build an AI Agent. This represents a hugely beneficial shift in building AI Agents thanks to all the pre-built connectors that are available for use in Azure Logic Apps. With this functionality, we can build an AI Agent that can perform operations in the software systems that make up your organizations technology ecosystem; a few examples are ERP systems such as SAP and Business Central, Azure services such as Azure Language and Azure Speech and data services such as PostgreSQL, SQL Server and Oracle.
You may be saying to yourself, this sounds exciting! How do I get started? The remainder of this blog post will answer exactly that and guide you through building your first AI Agent with Azure Logic Apps.
Concepts discussed in this article
- Setting up an Azure Open AI model
- Creating an Agent workflow in Azure Logic Apps
- Prompt engineering best practices
- Agent Parameters
- Agent Tools
- Reviewing Agent Chat History
0) Setup an Azure Open AI model for our AI agent to use
Before we jump into creating our AI Agent, we’ll need to set up a model for our agent to use. We can do this by creating and deploying an Azure Open AI model using Azure AI Foundry — You can follow these instructions on how to deploy an Azure Open AI model.
Now that we have our model created in Microsoft Azure, we can continue on to the exciting stuff of creating an AI Agent in Azure Logic Apps.
1) Create a Logic App Standard Resource in the Azure Portal
Agent Loop is only available in Azure Logic Apps Standard. The first thing you’ll need to do is create a new Azure Logic App in the Azure Portal — How to create a logic app standard resource in the Azure Portal.
2) Create an Agent Workflow
Now that we have our Azure Logic App resource created, we can open it in the Azure Portal, navigate to the Workflows section within the left-hand navigation blade, click Add and click Add to create a workflow.
For those familiar with Azure Logic Apps, you’ll notice a new option available on the right-hand side called Agent. Enter the name of your workflow as “WeatherAgent” and click Create. Choosing this option will enable us to create an AI Agent within an Azure Logic Apps workflow.
The Logic Apps designer will now show a familiar setting where you can specify the trigger that launches your workflow and it includes new functionality for Agent Loop.
3) Trigger on HTTP Request with input
We’ll click on the Add a trigger action and update our trigger to be When an HTTP request is received; we’ll specify that this method only accepts HTTP POST requests and that it accepts a JSON schema in the following format.
{
"type": "object",
"properties": {
"prompt": {
"type": "string"
}
}
} 4) Configure your Agent Loop to use our Azure Open AI Model
With this setup, we can now trigger our workflow remotely over HTTP. Now that we can trigger our workflow, let’s setup the workflow, so that it can do something with our prompt. For this component, we’ll click on the agent loop action called Default Agent and rename it so Weather Agent. Next we’ll hook it up to our azure open AI model; you’ll see in the image below that we’ve created a connection to our Azure Open AI and selected a model named gpt-4.1 that we deployed earlier.
5) Add System and User Instructions
We need to provide a prompt for our AI Agent to use, so that it knows how to respond to the input that we are being provided. Writing a good prompt for your AI Agent to do what you want requires a bit of research and tweaking; to get you started, I suggest following the best practices that Microsoft has provided around how to get the most out of your prompts into Azure Open AI models — Best practices from Microsoft on prompt engineering with Azure Open AI service.
For this agent, we want it to respond with weather information for a specific location; for that effect, we will enter the following prompt into the System Instructions textbox.
Act as a weather research assistant. You will receive a prompt that is asking you to provide information about the weather. You will utilize the information available to answer the weather related question.
Follow these steps to answer the question.
1. Determine what location in the world is being asked about.
2. Determine the weather at that location.
3. Respond using the information in the form of a riddle.
4. Respond using the information in the form of a joke.
5. Respond using the information in the form of a poem.
6. Give me the weather forecast in the units specified.
Abide by the following rules when answering the question.
1. Do not use any external data sources aside from the ones provided.
2. If the question is not about weather, then do not answer it. We want our AI Agent to be able to leverage the information that was provided to us by the user. To do this, we need to provide the prompt we are receiving in our HTTP request as an input into our AI Agent. We can do this by setting the User Instructions Item.
6) Setup a Agent Tool and Agent Parameters
With our AI Agent configured successfully, we need to give our AI Agent a tool that it can use to gather weather information. Without this grounding, the AI Agent will gather weather information from unknown sources and most likely provide inaccurate information. To do this, we’ll click the Add Tool button within our Agent Loop and name the tool “Tool_GetWeather”. Within this tool, we need to provide a description, so that our AI Agent knows what the purpose of our tool is. We’ll give it the description: Gets the current weather in a specific location in the world and returns the temperature.
Next is to add an Agent Parameter. Agent parameters are derived by our AI Agent based on the information contained within our prompt and output by our tools. The key to making good use of an Agent Parameter is to provide a detailed description; the agent will use this description to determine what value it should assign the parameter. We’ll define a parameter called Location, give it a type of string and provide a description for the agent to use. The description we are using in the image below is “Location search query. Valid inputs are City, Region, State, Country, Landmark, Postal Code, latitude and longitude”.
Add an action underneath our tool and choose the Get current weather action from the MSN Weather connector. When configuring the location parameter of the action, click the Agent Parameter option as shown in the image below. From here, we can select the Location parameter that we configured earlier.
7) Save and run your workflow
Save your workflow and lets trigger it to see the execution. You can trigger your workflow from within the portal by clicking Run and clicking Run with Payload. In the panel that appears, choose POST as your HTTP verb, add the payload described below and click Run. Now that its been run, we can click over to the Run History and click on our execution to see the results. When we open the run, we are shown the chat history, which shows all of the actions that the agent has taken. The first thing we see in the chat is our system instructions.
This is followed by our User Instructions as the next item in the chat. We can see the agent making use of the Get Weather tool that we added. It then responds with a joke, riddle and poem about the weather as per our system instructions.
This is transformative functionality being added to Azure Logic Apps
This is the tip of the iceberg in terms of what we can do with this new functionality in Azure Logic Apps. This functionality has a lot of potential and the number of use cases are up to the business and implementer; a few use cases include responding to error events and perform processes based on conversations with humans. Azure Logic Apps offers a unique value proposition where we can build AI Agents using low code and leverage all of the connectors that are already available to us. I’m excited to see how the use cases for this functionality evolve over time; without a doubt, this is an extremely transformative and useful piece of functionality being added to the Azure Logic Apps toolkit.
About the Author
Cameron McKay
Automating communication between systems with Microsoft Azure.
McKay, C (2025). How to Build an AI Agent with Azure Logic Apps. Available at: (3) How to Build an AI Agent with Azure Logic Apps | LinkedIn [Accessed: 7th August 2025].