Azure AI Foundry Agents Demos
Sample code and walkthroughs for building Azure AI Foundry Agents using the GA v2 SDK (azure-ai-projects>=2.0.0). Demos cover MCP server integration, Code Interpreter, and enterprise patterns like credential isolation via Foundry project connections.
Demos (v2 — GA SDK + New Foundry UI)
Every demo follows a consistent pattern:
create_agent.py— Create the agent (run once)ask_agent.py— Interactive chat REPL with streaming output.env.sample— Required environment variablesrequirements.txt— Python dependenciesREADME.md— Setup and walkthrough
Training labs
The training/l200-tools/ suite accompanies the L200 Foundry tools training
module for support engineers. Unlike the standalone demos, these labs form one sequence and share a
single Python environment:
- Toolbox versioning
- Azure AI Search grounding
- Foundry IQ knowledge base
The training README starts with Python, Git, Azure CLI, virtual-environment, dependency, and configuration setup for learners who have not used Python before.
Quick Start
# Pick a demo directory
cd enterprise_github_agent # or mcp_mslearn_agent, mcp_local_server_agent
# Set up
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.sample .env
# Fill in PROJECT_ENDPOINT and MODEL_DEPLOYMENT_NAME
# Create the agent and chat
python create_agent.py
python ask_agent.py
See each demo's README for detailed setup instructions.
Prerequisites
- Python 3.11+
- An Azure AI Foundry project with a deployed model
- Azure CLI logged in (
az login) forDefaultAzureCredential
Architecture
All demos use the GA V2 SDK:
- Agent creation via
PromptAgentDefinition+create_version() - Conversations via OpenAI Responses API (
responses.create()) - Credentials in Foundry project connections (not in code)
See docs/architecture/overview.md for details and docs/architecture/decisions/ for ADRs.
Archived Demos (v1)
The original demos from the walkthrough video are preserved in archive/v1/. They target the deprecated v1 Agents SDK (azure-ai-agents) and the legacy Foundry portal UI.
Roadmap
- Enterprise GitHub Agent (Phase 1)
- MCP Microsoft Learn Agent v2 rewrite (Phase 2)
- MCP Local Server Agent v2 rewrite (Phase 3)
- Cross-cutting polish — architecture docs, README (Phase 4)
- Fabric Data Agent — natural language queries against Fabric lakehouse (Phase 5)
- Multi-Tool Knowledge Worker — File Search + Code Interpreter + Web Search (Phase 6)
- Browser Automation Agent — browser control via natural language (Phase 7)
Running Tests
pip install pytest
python -m pytest enterprise_github_agent/tests/ mcp_mslearn_agent/tests/ mcp_local_server_agent/tests/ -v
# 167 tests, all structural (no live Azure calls needed)