A comprehensive hands-on workshop for building AI applications with Azure AI Foundry. Learn to deploy models, implement tracing & observability, and create intelligent agent-based applications.
- Deploy and test Azure OpenAI models
- Implement monitoring and tracing for AI applications
- Build intelligent agent-based applications
- Work with Azure AI Foundry SDK
Before starting, ensure you have:
- Azure Account - Get free Azure credits
- Azure CLI - For authentication and infrastructure deployment
- Terraform - For infrastructure as code deployment
- Python 3.12+ - Required for the workshop environment
- UV modern Python dependency manager
# Login to Azure
az login
# Verify your subscription
az account showClone the repository:
git clone https://github.com/yanivvak/azure-openai-workshop.git
cd azure-openai-workshopInstall dependencies:
uv syncValidate installation:
uv run python validate_setup.pyUsing Terraform (Multi-cloud):
| Platform | Command |
|---|---|
| macOS/Linux | cd infrastructure/terraform && ./deploy.sh |
| Windows (PowerShell) | cd infrastructure/terraform; terraform init; terraform apply |
| Windows (Git Bash) | cd infrastructure/terraform && ./deploy.sh |
This deployment creates:
- Azure AI Foundry resource
- AI Foundry project
- GPT-4.1-mini model deployment
- Required permissions and security settings
-
Copy environment template:
Platform Command macOS/Linux/Git Bash cd ../../ && cp .env.example .envWindows (PowerShell) cd ..\..; Copy-Item .env.example .envWindows (Command Prompt) cd ..\.. && copy .env.example .env -
Update required variables in
.envusing deployment outputs:# From deployment output: aiFoundryEndpoint AZURE_OPENAI_ENDPOINT=https://your-foundry-resource.cognitiveservices.azure.com/ # From deployment output: modelDeploymentName AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4.1-mini # API version AZURE_OPENAI_API_VERSION=2024-10-21
-
Choose authentication method:
Option A: Entra ID (Recommended)
- Uses your
az logincredentials - No additional setup required
Option B: API Key
- Get key from Azure Portal → AI Foundry resource → Keys and Endpoint
- Add to
.env:AZURE_OPENAI_API_KEY=your-api-key
- Uses your
| Notebook | Topic | Description |
|---|---|---|
01-deploy-first-model.ipynb |
Model Deployment | Deploy and test your first Azure OpenAI model |
02-foundry-tracing.ipynb |
Tracing & Observability | Implement monitoring and tracing for AI applications |
03-agent_evaluators.ipynb |
Agent Evaluation | Learn to evaluate and test AI agents |
04-agents.ipynb |
Agent Applications | Build intelligent agent-based applications |
05-agents_tracing.ipynb |
Advanced Tracing | Advanced tracing techniques for agents |
06-fine_tuning.ipynb |
Fine-tuning | Custom model fine-tuning with Azure OpenAI |
For enterprise-scale security analytics and advanced monitoring, explore the ADX integration:
- Location:
adx/folder - Notebook:
adx/notebooks/03-security-pentesting-adx.ipynb - Documentation: ADX README
- Features: Real-time analytics, cost tracking, security monitoring, and business intelligence
uv run python validate_setup.pyThis checks all required packages, Azure SDK integration, and environment configuration.
| Issue | Solution |
|---|---|
| Authentication errors | Run az login and verify with az account show |
| Azure CLI not found | Install Azure CLI, then run az login |
| Wrong subscription | Run az account set --subscription "Your Subscription Name" |
| Module import errors | Run uv sync to reinstall dependencies |
| Environment variable errors | Ensure required variables are set in .env file |
| API quota exceeded | Request quota increase or change Azure region |
| Model deployment fails | Ensure S0 SKU and region supports GPT-4.1-mini |
Verify your environment variables:
macOS/Linux/Git Bash:
echo "Endpoint: $AZURE_OPENAI_ENDPOINT"
echo "Deployment: $AZURE_OPENAI_DEPLOYMENT_NAME"
echo "API Version: $AZURE_OPENAI_API_VERSION"Windows (PowerShell):
Write-Host "Endpoint: $env:AZURE_OPENAI_ENDPOINT"
Write-Host "Deployment: $env:AZURE_OPENAI_DEPLOYMENT_NAME"
Write-Host "API Version: $env:AZURE_OPENAI_API_VERSION"Windows (Command Prompt):
echo Endpoint: %AZURE_OPENAI_ENDPOINT%
echo Deployment: %AZURE_OPENAI_DEPLOYMENT_NAME%
echo API Version: %AZURE_OPENAI_API_VERSION%# Add a new package
uv add package-name
# Add development tools
uv add --group dev package-nameThe workshop includes all necessary packages:
- Azure AI:
azure-ai-projects[agents],azure-ai-inference,azure-identity - OpenAI SDK:
openaiwith Azure OpenAI support - Observability:
opentelemetry-*,azure-monitor-opentelemetry - Data Analytics:
azure-kusto-data,azure-kusto-ingest(Azure Data Explorer) - Data & Analysis:
pandas,numpy,matplotlib - Jupyter:
jupyter,ipykernel
Contributions are welcome! Please feel free to submit issues and enhancement requests.
This project is licensed under the MIT License - see the LICENSE file for details.