Getting Started
Welcome to the Azure AI Travel Agents sample application! This project demonstrates how:
- To build a multi-agent system using Azure AI Foundry services and LlamaIndex.TS.
- To implement various Model Context Protocol (MCP) servers in different programming languages.
- To provision and deploy the application to Azure using the Azure Developer CLI (azd).
Preview the application locally for FREE
To run and preview the application locally, we will use Docker Model Runner.
[!NOTE] If your machine does not have enough resources to run the Docker Model Runner, you can still run the application using Azure OpenAI. Please refer to the Preview the application using Azure AI Foundry section below.
Prerequisites
- Git (for cloning the repository)
- Node.js (for the UI and API services)
- Docker v4.42.0 or later (for the MCP servers)
- ai/phi4:14B-Q4_0 model (7.80 GB)
- This is the model variant from the Phi-4 family that supports Function Calling which is required for the application to work.
In order to run the application locally, you need to clone the repository and run the preview script. This will set up the necessary environment and start the application.
We also recommend you fork the repository to your own GitHub account so you can make changes and experiment with the code.
Using HTTPS
git clone https://github.com/YOUR-USERNAME/azure-ai-travel-agents.git
Using SSH
git clone git@github.com:YOUR-USERNAME/azure-ai-travel-agents.git
Using GitHub CLI
gh repo clone YOUR-USERNAME/azure-ai-travel-agents
Start the application
- Run the preview script from the root of the project:
For Linux and macOS users
./preview.sh
For Windows users
.\preview.ps1
Start the API service by running the following command in a terminal:
npm start --prefix=src/api
Open a new terminal and start the UI service by running the following command:
npm start --prefix=src/ui
Once all services are up and running, you can access the UI at http://localhost:4200.
You can also view the traces via the Aspire Dashboard at http://localhost:18888.
- On
Structured
tab you'll see the logging messages from the tool-echo-ping and api services. TheTraces
tab will show the traces across the services, such as the call from api to echo-agent.
Preview the application using Azure AI Foundry
Prerequisites
In order to run the application using Azure AI Foundry, ensure you have the following installed before running the application:
- Git (for cloning the repository)
- Node.js (for the UI and API services)
- Docker (for the MCP servers)
- Azure Developer CLI (for managing Azure resources)
- Powershell 7+ (pwsh) - For Windows users only.
- Important: Ensure you can run
pwsh.exe
from a PowerShell terminal. If this fails, you likely need to upgrade PowerShell.
- Important: Ensure you can run
Fork and clone the repository
To run and preview the application locally, we recommend you fork the repository to your own GitHub account so you can make changes and experiment with the code.
- Clone the repository:
Using HTTPS
git clone https://github.com/YOUR-USERNAME/azure-ai-travel-agents.git
Using SSH
git clone git@github.com:YOUR-USERNAME/azure-ai-travel-agents.git
Using GitHub CLI
gh repo clone YOUR-USERNAME/azure-ai-travel-agents
- Navigate to the cloned repository:
cd azure-ai-travel-agents
- Login to your Azure account:
azd auth login
For GitHub Codespaces users
If the previous command fails, try:
azd auth login --use-device-code
- Provision the Azure resources. This is an important step that sets up an Azure AI Foundry environment:
azd provision
When asked, enter a name that will be used for the resource group. Depending on the region you choose and the available resources and quotas, you may encouter provisioning errors. If this happens, please read our troubleshooting guide in the Advanced Setup documentation.
- Open a new terminal and run the following command to start the API:
npm start --prefix=src/api
- Open a new terminal and run the following command to start the UI:
npm start --prefix=src/ui
- Once all services are up and running, you can access the UI at http://localhost:4200.
You can also view the traces via the Aspire Dashboard at http://localhost:18888.
- On
Structured
tab you'll see the logging messages from the tool-echo-ping and api services. TheTraces
tab will show the traces across the services, such as the call from api to echo-agent.
⚠️ In case you encounter issues when starting either the API or UI, try running azd hooks run postprovision
to force run the post-provisioning hooks. This is due to an issue with the azd provision
command not executing the post-provisioning hooks automatically, in some cases, the first time you run it.
Use GitHub Codespaces
You can run this project directly in your browser by using GitHub Codespaces, which will open a web-based VS Code:
Use a VSCode dev container
A similar option to Codespaces is VS Code Dev Containers, that will open the project in your local VS Code instance using the Dev Containers extension.
You will also need to have Docker installed on your machine to run the container.
Cost estimation
Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage. However, you can use the Azure pricing calculator for the resources below to get an estimate.
- Azure Container Apps: Consumption plan, Free for the first 2M executions. Pricing per execution and memory used. Pricing
- Azure Container Registry: Free for the first 2GB of storage. Pricing per GB stored and per GB data transferred. Pricing
- Azure OpenAI: Standard tier, GPT model. Pricing per 1K tokens used, and at least 1K tokens are used per query. Pricing
- Azure Monitor: Free for the first 5GB of data ingested. Pricing per GB ingested after that. Pricing
⚠️ To avoid unnecessary costs, remember to take down your app if it's no longer in use, either by deleting the resource group in the Portal or running azd down --purge
(see Clean up).
Deploy the sample
- Open a terminal and navigate to the root of the project.
- Authenticate with Azure by running
azd auth login
. - Run
azd up
to deploy the application to Azure. This will provision Azure resources, deploy this sample, with all the containers, and set up the necessary configurations.- You will be prompted to select a base location for the resources. If you're unsure of which location to choose, select
swedencentral
. - By default, the OpenAI resource will be deployed to
swedencentral
. You can set a different location withazd env set AZURE_LOCATION <location>
. Currently only a short list of locations is accepted. That location list is based on the OpenAI model availability table and may become outdated as availability changes.
- You will be prompted to select a base location for the resources. If you're unsure of which location to choose, select
The deployment process will take a few minutes. Once it's done, you'll see the URL of the web app in the terminal.

You can now open the web app in your browser and start chatting with the bot.
Clean up
To clean up all the Azure resources created by this sample:
- Run
azd down --purge
- When asked if you are sure you want to continue, enter
y
The resource group and all the resources will be deleted.
Technical documentation
For more detailed information about the architecture, components, and how the application works, please refer to the Technical Documentation.
Advanced Setup
To run the application in a more advanced local setup or deploy to Azure, please refer to the troubleshooting guide in the Advanced Setup documentation. This includes setting up the Azure Container Apps environment, using local LLM providers, configuring the services, and deploying the application to Azure.
Contributing
We welcome contributions to the AI Travel Agents project! If you have suggestions, bug fixes, or new features, please feel free to submit a pull request. For more information on contributing, please refer to the CONTRIBUTING.md file.
Join the Community
We encourage you to join our Azure AI Foundry Developer Community to share your experiences, ask questions, and get support:
- aka.ms/foundry/discord - Join our Discord community for real-time discussions and support.
- aka.ms/foundry/forum - Visit our Azure AI Foundry Developer Forum to ask questions and share your knowledge.
