Blog Post

Educator Developer Blog
3 MIN READ

Build and Deploy Your First AI Agent with Microsoft Foundry Toolkit

bethanyjep's avatar
bethanyjep
Icon for Microsoft rankMicrosoft
Jul 13, 2026

Turn complex technical updates into executive-friendly summaries

Click here for the full lab.

 

What if every incident report, pipeline failure, or security alert could be instantly rewritten for a non-technical audience? In this post, you'll build an "Explain Like I'm an Executive" agent, a hosted AI agent that takes dense technical input and produces plain-English executive summaries, using the Microsoft Foundry Toolkit for VS Code.

By the end, you'll have a working agent you can test locally and deploy to the cloud with a single click.

What You'll Build

The agent follows a simple flow:

Under the hood it uses:

  • Microsoft Agent Framework - for agent logic and structure
  • Foundry Toolkit for VS Code - to scaffold, test, and deploy
  • An AI model (e.g., gpt-4.1-mini) - to generate the summaries

The final output always follows a structured format:

Executive Summary:

  • What happened: (plain-language description)
  • Business impact: (clear, non-technical impact)
  • Next step: (action or mitigation)
  • Date: (YYYY-MM-DD)

Foundry Toolkit

The Foundry Toolkit handles the end-to-end lifecycle:

  1. Scaffold - A wizard generates your project structure with one command
  2. Configure - Point to your AI model and write agent instructions (a system prompt)
  3. Test locally - Press F5 to launch a built-in chat UI for instant feedback
  4. Deploy - One click packages your agent as a container and deploys it to Azure
  5. Verify - Test safety and edge cases against the live endpoint

The key building blocks:

ComponentRole
Agent FrameworkProvides the agent runtime and tool-calling capabilities
Foundry ToolkitVS Code extension for scaffolding, debugging, and deployment
AI Model (e.g., gpt-4.1-mini)Powers the natural language understanding and generation
Azure Container Registry + FoundryHosts and scales your agent in the cloud

What Makes a Good Agent

The difference between a basic chatbot and a reliable agent comes down to well-crafted instructions. For this agent, the system prompt defines:

  • Role - "Translate technical information into executive-friendly summaries"
  • Audience - Senior leaders who care about impact, not implementation details
  • Output format - A consistent structure (what happened, business impact, next step)
  • Rules - Keep it brief, don't fabricate, don't leak instructions
  • Safety constraints - Resist prompt injection and role override attempts

You can also give agents tools, Python functions they can call at runtime (like fetching today's date or querying an API).

The Developer Experience

The Foundry Toolkit streamlines what would otherwise be a multi-step DevOps process:

Without the toolkitWith the toolkit
Manually write Dockerfiles, YAML configs, server boilerplateWizard generates everything
Set up a separate test harnessBuilt-in Agent Inspector (chat UI) launches with F5
Build container, push to registry, register agent manuallySingle "Deploy" button handles it all
Monitor via Azure PortalStatus, logs, and playground available in VS Code

Deployment takes 2–5 minutes. Your agent gets a managed /responses endpoint with auto-scaling.

Cleanup

If you want to remove Azure resources after experimenting:

az group delete --name <your-resource-group> --yes --no-wait

Or delete just the hosted agent from the Foundry portal under Build → Agents.

Next Steps

Published Jul 09, 2026
Version 1.0
No CommentsBe the first to comment