Build, test, and deploy AI agents to Microsoft Foundry Agent Service as Hosted Agents - na totally from VS Code using di Microsoft Foundry extension and Foundry Toolkit.
Hosted Agents dey currently for preview. Supported regions no too plenty - see region availability.
Di
agent/folder wey dey each lab na automatically scaffolded by di Foundry extension - you go den customize di code, test am for your machine, and deploy.
Arabic | Bengali | Bulgarian | Burmese (Myanmar) | Chinese (Simplified) | Chinese (Traditional, Hong Kong) | Chinese (Traditional, Macau) | Chinese (Traditional, Taiwan) | Croatian | Czech | Danish | Dutch | Estonian | Finnish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Kannada | Khmer | Korean | Lithuanian | Malay | Malayalam | Marathi | Nepali | Nigerian Pidgin | Norwegian | Persian (Farsi) | Polish | Portuguese (Brazil) | Portuguese (Portugal) | Punjabi (Gurmukhi) | Romanian | Russian | Serbian (Cyrillic) | Slovak | Slovenian | Spanish | Swahili | Swedish | Tagalog (Filipino) | Tamil | Telugu | Thai | Turkish | Ukrainian | Urdu | Vietnamese
You prefer Clone am for your local?
This repository get 50+ language translations wey make di download size big. If you want clone without di translations, use sparse checkout:
Bash / macOS / Linux:
git clone --filter=blob:none --sparse https://github.com/microsoft-foundry/Foundry_Toolkit_for_VSCode_Lab.git cd Foundry_Toolkit_for_VSCode_Lab git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'CMD (Windows):
git clone --filter=blob:none --sparse https://github.com/microsoft-foundry/Foundry_Toolkit_for_VSCode_Lab.git cd Foundry_Toolkit_for_VSCode_Lab git sparse-checkout set --no-cone "/*" "!translations" "!translated_images"Dis one go give you everything wey you need to complete di course quick quick.
flowchart TB
subgraph Local["Local Development (VS Code)"]
direction TB
FE["Microsoft Foundry
Extension"]
FoundryToolkit["Foundry Toolkit
Extension"]
Scaffold["Scaffolded Agent Code
(main.py · agent.yaml · Dockerfile)"]
Inspector["Agent Inspector
(Local Testing)"]
FE -- "Create New
Hosted Agent" --> Scaffold
Scaffold -- "F5 Debug" --> Inspector
FoundryToolkit -.- Inspector
end
subgraph Cloud["Microsoft Foundry"]
direction TB
ACR["Azure Container
Registry"]
AgentService["Foundry Agent Service
(Hosted Agent Runtime)"]
Model["Azure OpenAI
(gpt-4.1 / gpt-4.1-mini)"]
Playground["Foundry Playground
& VS Code Playground"]
ACR --> AgentService
AgentService -- "/responses API" --> Model
AgentService --> Playground
end
Scaffold -- "Deploy
(Docker build + push)" --> ACR
Inspector -- "POST /responses
(localhost:8088)" --> Scaffold
Playground -- "Test prompts" --> AgentService
style Local fill:#f0f4ff,stroke:#4a6cf7,stroke-width:2px
style Cloud fill:#fff4e6,stroke:#f59e0b,stroke-width:2px
Flow: Foundry extension dey scaffold di agent → you go customize code & instructions → test am locally wit Agent Inspector → deploy am for Foundry (Docker image wey dem push go ACR) → verify am for Playground.
| Lab | Description | Status |
|---|---|---|
| Lab 01 - Single Agent | Build di "Explain Like I'm an Executive" Agent, test am locally, and deploy go Foundry | ✅ Available |
| Lab 02 - Multi-Agent Workflow | Build di "Resume → Job Fit Evaluator" - 4 agents dey work together to score di resume fit and make learning roadmap | ✅ Available |
For dis workshop, you go build di "Explain Like I'm an Executive" Agent - na AI agent wey go take technikal wahala talk and translate am into calm, boardroom-ready summaries. Because make we honest, nobody wey dey C-suite wan hear about "thread pool exhaustion caused by synchronous calls introduced in v3.2."
I build dis agent afta one too many times wey my perfect post-mortem report get answer: "So... di website down or no be so?"
You go give am technikal update. E go return executive summary - three bullet points, no jargon, no stack traces, no fear or yawa. Just wetin happen, business impact, and next step.
You talk:
"The API latency increased due to thread pool exhaustion caused by synchronous calls introduced in v3.2."
Di agent go answer:
Executive Summary:
- Wetin happen: After di latest release, di system slow down.
- Business impact: Some users experience delay wen dem dey use di service.
- Next step: Dem don rollback di change and dem dey prepare fix before dem go deploy again.
Na dead-simple, single-purpose agent - perfect make you learn how the hosted agent workflow dey from beginning to end without yawa with complex tool chains. And true true? Every engineering team fit use one like dis.
📂 Foundry_Toolkit_for_VSCode_Lab/
├── 📄 README.md ← You are here
├── 📂 ExecutiveAgent/ ← Standalone hosted agent project
│ ├── agent.yaml
│ ├── Dockerfile
│ ├── main.py
│ └── requirements.txt
└── 📂 workshop/
├── 📂 lab01-single-agent/ ← Full lab: docs + agent code
│ ├── README.md ← Hands-on lab instructions
│ ├── 📂 docs/ ← Step-by-step tutorial modules
│ │ ├── 00-prerequisites.md
│ │ ├── 01-install-foundry-toolkit.md
│ │ ├── 02-create-foundry-project.md
│ │ ├── 03-create-hosted-agent.md
│ │ ├── 04-configure-and-code.md
│ │ ├── 05-test-locally.md
│ │ ├── 06-deploy-to-foundry.md
│ │ ├── 07-verify-in-playground.md
│ │ └── 08-troubleshooting.md
│ └── 📂 agent/ ← Reference solution (auto-scaffolded by Foundry extension)
│ ├── agent.yaml
│ ├── Dockerfile
│ ├── main.py
│ └── requirements.txt
└── 📂 lab02-multi-agent/ ← Resume → Job Fit Evaluator
├── README.md ← Hands-on lab instructions (end-to-end)
├── 📂 docs/ ← Step-by-step tutorial modules
│ ├── 00-prerequisites.md
│ ├── 01-understand-multi-agent.md
│ ├── 02-scaffold-multi-agent.md
│ ├── 03-configure-agents.md
│ ├── 04-orchestration-patterns.md
│ ├── 05-test-locally.md
│ ├── 06-deploy-to-foundry.md
│ ├── 07-verify-in-playground.md
│ └── 08-troubleshooting.md
└── 📂 PersonalCareerCopilot/ ← Reference solution (multi-agent workflow)
├── agent.yaml
├── Dockerfile
├── main.py
└── requirements.txt
Note: Di
agent/folder inside each lab na wetin di Microsoft Foundry extension generate wen you runMicrosoft Foundry: Create a New Hosted Agentfrom di Command Palette. Di files go den get customized with your agent instructions, tools, and config. Lab 01 go guide you how to recreate am from scratch.
git clone https://github.com/microsoft-foundry/Foundry_Toolkit_for_VSCode_Lab.git
cd Foundry_Toolkit_for_VSCode_Labpython -m venv venvActivate am:
- Windows (PowerShell):
.\venv\Scripts\Activate.ps1
- macOS / Linux:
source venv/bin/activate
pip install -r workshop/lab01-single-agent/agent/requirements.txtCopy di example .env file inside di agent folder and fill am with your values:
cp workshop/lab01-single-agent/agent/.env.example workshop/lab01-single-agent/agent/.envEdit workshop/lab01-single-agent/agent/.env:
AZURE_AI_PROJECT_ENDPOINT=https://<your-account>.services.ai.azure.com/api/projects/<your-project>
MODEL_DEPLOYMENT_NAME=<your-model-deployment-name>Each lab get imself modules. Start with Lab 01 to learn di basics, den move go Lab 02 for multi-agent workflows.
Lab 01 - Single Agent (full instructions)
| # | Module | Link |
|---|---|---|
| 1 | Read di prerequisites | 00-prerequisites.md |
| 2 | Install Foundry Toolkit & Foundry extension | 01-install-foundry-toolkit.md |
| 3 | Create Foundry project | 02-create-foundry-project.md |
| 4 | Create hosted agent | 03-create-hosted-agent.md |
| 5 | Configure instructions & environment | 04-configure-and-code.md |
| 6 | Test locally | 05-test-locally.md |
| 7 | Deploy to Foundry | 06-deploy-to-foundry.md |
| 8 | Verify for playground | 07-verify-in-playground.md |
| 9 | Troubleshooting | 08-troubleshooting.md |
Lab 02 - Multi-Agent Workflow (full instructions)
| # | Module | Link |
|---|---|---|
| 1 | Prerequisites (Lab 02) | 00-prerequisites.md |
| 2 | Understand multi-agent architecture | 01-understand-multi-agent.md |
| 3 | Scaffold di multi-agent project | 02-scaffold-multi-agent.md |
| 4 | Configure agents & environment | 03-configure-agents.md |
| 5 | Orchestration patterns | 04-orchestration-patterns.md |
| 6 | Test locally (multi-agent) | 05-test-locally.md |
| 7 | Deploy to Foundry | 06-deploy-to-foundry.md |
| 8 | Verify for playground | 07-verify-in-playground.md |
| 9 | Troubleshooting (multi-agent) | 08-troubleshooting.md |
![]() Shivam Goyal |
| Scenario | Required roles |
|---|---|
| Create new Foundry project | Azure AI Owner for Foundry resource |
| Deploy to existing project (new resources) | Azure AI Owner + Contributor for subscription |
| Deploy to fully configured project | Reader for account + Azure AI User for project |
Important: Azure
OwnerandContributorroles only get management permission, no development (data action) permission. You need Azure AI User or Azure AI Owner to build and deploy agents.
- Quickstart: Deploy your first hosted agent (VS Code)
- Wetin be hosted agents?
- Create hosted agent workflows for VS Code
- Deploy hosted agent
- RBAC for Microsoft Foundry
- Architecture Review Agent Sample - Real-life hosted agent wit MCP tools, Excalidraw diagrams, and dual deployment
Disclaimer:
Dis document don translate wit AI translation service Co-op Translator. Even tho we dey try make am correct, abeg sabi say automated translations fit get error or no too correct. Di original document for dia own language na di correct one wey you suppose trust. For important tin dem, na professional human translation dem recommend. We no go responsible for any yawa or wrong understanding wey fit happen because of dis translation.
