This repository contains a starter template for building an Microsoft Foundry that hosts AI agents using the Microsoft Foundry Hosted Agent Service.
Clone this repository to your local machine using the following command:
git clone https://github.com/hatasaki/hosted-agent-workshop.git
cd hosted-agent-workshop- Install azd
- Windows:
winget install microsoft.azd - Linux:
curl -fsSL https://aka.ms/install-azd.sh | bash - MacOS:
brew tap azure/azd && brew install azd
- Windows:
-
Create new directory and navigate into it:
mkdir my-hosted-agent cd my-hosted-agent -
Bring down the template code:
azd init -t https://github.com/Azure-Samples/azd-ai-starter-basic
- input your unique project name when prompted. Ex.
<username>-hosted-agent
This will perform a git clone
- input your unique project name when prompted. Ex.
-
Sign into your Azure account:
azd auth login
-
Download a sample agent definition:
azd ai agent init -m ../msft-docs-agent/agent.yaml
- install agent extension if prompted.
- select your subscription when prompted.
- select
North Central USregion. - select
GlobalStandardfor mode SKU. - deployment name of model cab be left as default. (gpt-4o-mini)
- container memory, CPU, and replicas can be left as default. (2GB, 1 CPU, 1 min replica and 3 max replicas)
-
Provision Microsoft Foundry and the sample agent:
azd up
-
Open Microsoft Foundry portal and test the agent
- Note: azd up creates new Microsoft Foundry account. Navigate to your Microsoft Foundry (should be listed under resource group
rg-<username>-hosted-agentyou specified in step 1).
-
Deleting Resources: To delete all associated resources and shut down the application, execute the following command:
azd down
Please note that this process may take up to 20 minutes to complete.