I'm Shivam Goyal, at Microsoft Learn Student Ambassador, I am constantly exploring new ways to leverage the power of Azure's AI services. In this tutorial, I'll share my experience building a flight booking agent using Azure AI Agent service tools within the Azure AI Foundry portal.
I was inspired by the new Microsoft AI Agents for Beginners course and took on the challenge on developing this agent. The agent solution is capable of interacting with users and providing information about flights, demonstrating the potential of Azure's conversational AI capabilities. Follow along as we create this intelligent agent from scratch.
Prerequisites
To complete this tutorial, you'll need:
- Azure Account: An Azure account with an active subscription is required. If you don't have one, you can create an account for free.
- Azure AI Foundry Hub: You'll need permissions to create an Azure AI Foundry hub (Contributor or Owner role) or have one already provisioned for you.
Creating an Azure AI Foundry Hub
Note: Azure AI Foundry was formerly known as Azure AI Studio.
- Follow the guidelines in the Azure AI Foundry documentation for creating an Azure AI Foundry hub.
- Once your project is created, dismiss any tips that appear and review the project page in the Azure AI Foundry portal. It should look similar to the following image:
Deploying a Model
- In your project's left-hand pane, navigate to My assets -> Models + endpoints.
- On the Model deployments tab, click the + Deploy model menu and select Deploy base model.
- Search for the gpt-4o-mini model, select it, and confirm the deployment.
Note: Deploying the gpt-4o-mini helps manage resource consumption and stay within your subscription's quota.
Creating the Agent
Now that a model is deployed, we can create the agent:
- In the left-hand pane, under Build & Customize, select Agents.
- Click + Create agent. In the Agent Setup dialog:
- Enter a name for your agent (e.g., FlightAgent).
- Ensure the gpt-4o-mini model deployment you created is selected.
- Set the Instructions using the following prompt to define the agent's behaviour:
For a more comprehensive prompt example, refer to this repository.
Advanced Features: You can add a Knowledge Base and Actions to enhance the agent's capabilities. These features are optional for this tutorial.
To create additional multi-AI agents, click New Agent.
Testing the Agent
- At the top of the agent's Setup pane, select Try in playground.
- Interact with your agent in the Playground by entering queries in the chat window. For instance, ask the agent to "search for flights from Seattle to New York on the 28th."
Note: The agent may not provide completely accurate responses as it doesn't use real-time data in this example. The purpose is to test its ability to understand and respond to user queries.
- After testing, you can further customize the agent by adding more intents, training data, and actions.
Cleaning Up Resources
To avoid additional costs, delete the resources when finished:
- Open the Azure portal and locate the resource group containing your deployed hub resources.
- Select Delete resource group on the toolbar, enter the resource group name, and confirm the deletion.
Resources
- Azure AI Foundry Documentation
- Azure AI Foundry Portal
- Getting Started with Azure AI Studio
- Fundamentals of AI Agents on Azure
- Microsoft AI Community Discord
- AI Agents for Beginners 10 lesson course
- Develop AI agents on Azure - Training | Microsoft Learn
If you have any further questions or would like to connect for more discussion, feel free to reach out to me on LinkedIn | GitHub
Updated Feb 27, 2025
Version 2.0ShivamGoyal03
Brass Contributor
Joined December 03, 2023
Educator Developer Blog
Follow this blog board to get notified when there's new activity