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.
| Demo | Description | Tools | Tests |
|---|---|---|---|
| enterprise_github_agent | GitHub integration with code execution | MCP (GitHub) + Code Interpreter | 42 |
| mcp_mslearn_agent | Search Microsoft Learn documentation | MCP (MS Learn, public) | 41 |
| mcp_local_server_agent | Local MCP server with Chinook SQLite DB | MCP (custom, local + ngrok) | 84 |
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
# 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.pySee each demo's README for detailed setup instructions.
- Python 3.11+
- An Azure AI Foundry project with a deployed model
- Azure CLI logged in (
az login) forDefaultAzureCredential
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.
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.
- 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)
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)