Module 1 30 minutes

Module 1: Getting Started - Repository & Azure Setup

Clone the repository, understand the structure, and prepare your Azure environment for deployment

0%

Module 1: Getting Started - Repository & Azure Setup

Duration: 30 minutes

Objective: Get the code, understand what you're deploying, and configure Azure credentials for deployment.


๐Ÿ“Š About Your Progress Tracking

As you work through this training, your completion status is tracked automatically:

โœ… How it works:

  • Checkboxes and progress are saved in your browserโ€™s local storage
  • No login or account required
  • Your progress persists across browser sessions (as long as you use the same browser)

โš ๏ธ Important Note:

  • If you clear your browser cache/cookies, your progress will be reset
  • Progress is browser-specific (if you switch browsers, youโ€™ll start fresh)
  • For persistent tracking, consider bookmarking your progress or taking notes

๐Ÿ’ก Pro Tip: If youโ€™re working across multiple devices, keep a simple checklist in a text file or notebook!


๐Ÿค– Meet CORA: Your AI Training Partner

CORA Logo

CORA stands for Customer-Oriented Response Agent, but more importantly, sheโ€™s the name we gave our AI training application! ๐Ÿค–

Why โ€œCORAโ€?

  • Easy to remember (better than โ€œVoice Agent Simulator v2.3โ€)
  • Friendly and approachable
  • Represents a person (which is what she simulates!)
  • This is NOT an industry-standard acronym - itโ€™s the unique name for this specific application

What does CORA do?

CORA is an AI-powered customer simulator that:

  • Role-plays as a customer seeking help
  • Tests customer service agents in training
  • Adapts personality based on scenarios (happy, frustrated, confused, etc.)
  • Evaluates performance with AI-powered scoring
  • Provides analytics to track improvement over time

Think of CORA as: A digital customer who never gets tired of being asked the same questions, always gives constructive feedback, and never leaves a bad Yelp review. The perfect training partner! ๐ŸŒŸ

Business Value:

  • Train customer service teams safely without real customers
  • Scale training without hiring actors
  • Get consistent evaluation across all training sessions
  • Track performance improvements with data

๐Ÿ—บ๏ธ What Youโ€™ll Learn in This Training

This training is organized into modules that walk you through deploying, testing, and understanding CORA:

  • Module 1 (this module): Set up your development environment and Azure resources
  • Module 2: Deploy CORA to Azure using Infrastructure as Code
  • Module 3: Test CORA locally and understand the application architecture
  • Module 4: Explore Azure services that power CORA
  • Module 5: Monitor and troubleshoot your deployment
  • Module 6: Customize and extend CORA for your needs

By the end, youโ€™ll have a fully functional AI training application running in Azure, and youโ€™ll understand how all the pieces work together!


๐ŸŽฏ Learning Objectives

By the end of this module, you will:

  • Clone the training repository from GitHub
  • Understand the repository structure (src/, infra/, docs/)
  • Identify the key files needed for deployment
  • Log in to Azure CLI and verify subscription access
  • Locate your Azure AI Foundry project endpoint
  • Prepare environment configuration for deployment

๐Ÿ“ฅ Step 1: Get the Repository Code

You have three options to get the code on your local machine:

Open a terminal (PowerShell, Command Prompt, or Terminal) and run:

git clone https://github.com/jbaart37/Cora-Voice-Agent-Training.git
cd Cora-Voice-Agent-Training

Why Git? You can easily pull updates if we make changes to the training materials!

Option B: Using Visual Studio Code

  1. Open VS Code
  2. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
  3. Type โ€œGit: Cloneโ€ and press Enter
  4. Paste the repository URL: https://github.com/jbaart37/Cora-Voice-Agent-Training.git
  5. Choose a local folder to clone into
  6. Click โ€œOpenโ€ when prompted

๐Ÿ“ธ Screenshot placeholder: VS Code Git Clone dialog

Option C: Download as ZIP (No Git Required)

If you donโ€™t have Git installed or prefer not to use it:

  1. Go to https://github.com/jbaart37/Cora-Voice-Agent-Training
  2. Click the green Code button
  3. Click Download ZIP
  4. Extract the ZIP file to a folder on your computer
  5. Open the extracted folder in VS Code or your preferred editor

Note: If you download as ZIP, you wonโ€™t be able to use Git commands, but all the code will work fine!

GitHub Download ZIP

Click to enlarge


๐Ÿ“‚ Step 2: Understanding the Repository Structure

Once cloned, youโ€™ll see this structure:

Once cloned, youโ€™ll see this structure:

Cora-Voice-Agent-Training/
โ”œโ”€โ”€ src/                        # ๐Ÿ Application source code
โ”‚   โ”œโ”€โ”€ app.py                  # Flask web application
โ”‚   โ”œโ”€โ”€ agent.py                # Azure OpenAI agent logic
โ”‚   โ”œโ”€โ”€ storage_service.py      # Azure Table Storage
โ”‚   โ”œโ”€โ”€ config.py               # Configuration management
โ”‚   โ”œโ”€โ”€ requirements.txt        # Python dependencies
โ”‚   โ”œโ”€โ”€ Dockerfile              # Container image definition
โ”‚   โ”œโ”€โ”€ static/                 # CSS, JS, images
โ”‚   โ””โ”€โ”€ templates/              # HTML pages
โ”‚
โ”œโ”€โ”€ infra/                      # โ˜๏ธ Infrastructure as Code (Bicep)
โ”‚   โ”œโ”€โ”€ main.bicep              # Main deployment template
โ”‚   โ”œโ”€โ”€ main.parameters.json    # Default parameters
โ”‚   โ””โ”€โ”€ core/                   # Modular components
โ”‚       โ”œโ”€โ”€ host/               # Container Apps, Registry
โ”‚       โ””โ”€โ”€ monitor/            # Logging, Application Insights
โ”‚
โ”œโ”€โ”€ docs/                       # ๐Ÿ“š This training website
โ”‚   โ””โ”€โ”€ modules/                # Training modules you're reading now
โ”‚
โ”œโ”€โ”€ azure.yaml                  # ๐Ÿš€ Azure Developer CLI config
โ”œโ”€โ”€ README.md                   # Repository overview
โ””โ”€โ”€ DEPLOYMENT_FILES_README.md  # Deployment guide

Key Files to Know

File Purpose Youโ€™ll Need This For
azure.yaml Tells Azure Developer CLI how to deploy Module 2 deployment
infra/main.bicep Defines all Azure resources to create Understanding what gets deployed
src/config.py Application configuration Understanding environment variables
src/README.md Developer documentation Reference during troubleshooting
infra/README.md Infrastructure documentation Deployment options & cost info

๐Ÿ“ธ Screenshot placeholder: VS Code Explorer showing repository structure


๐Ÿ” Step 3: Azure CLI Setup

Before deploying, you need to authenticate with Azure.

Install Azure CLI (if not already installed)

Windows:

winget install -e --id Microsoft.AzureCLI

Mac:

brew install azure-cli

Linux:

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

Log In to Azure

az login

This will:

  1. Open your browser
  2. Prompt you to sign in with your Azure account
  3. Return to the terminal when complete
Azure CLI Login Success

Click to enlarge

Verify Your Subscription

# List all subscriptions you have access to
az account list --output table

# Set the subscription you want to use (if you have multiple)
az account set --subscription "Your Subscription Name"

# Verify it's set correctly
az account show --output table

Important: Make note of your Subscription ID - youโ€™ll need it later!


Do this now so you can fill it in as you go through the next steps!

Why Resource Groups Matter

Think of a resource group as a folder for your Azure resources. Everything for this project should go in the same resource group:

โœ… Benefits of keeping everything together:

  • ๐Ÿงน Easy cleanup: Delete the resource group = delete everything (no orphaned resources!)
  • ๐Ÿ’ฐ Cost tracking: See total cost for the entire project in one place
  • ๐Ÿ” Security management: Grant access to the whole project with one permission assignment
  • ๐Ÿ“Š Organization: All related resources grouped logically

Resource Group Naming

Recommended naming convention:

rg-cora-{environment}

Examples:
  rg-cora-dev      (for development)
  rg-cora-test     (for testing)
  rg-cora-prod     (for production)

Good news: When you run azd up in Module 2, it will automatically create the resource group for you! But itโ€™s important to understand why we use this pattern.

Resources That Will Live Together

In Module 2, these will all be created in one resource group:

  • Container Apps Environment
  • Container App (your web application)
  • Container Registry (stores Docker images)
  • Storage Account (conversation scores)
  • Log Analytics Workspace (logs)
  • Application Insights (monitoring)

๐Ÿ’ก Pro Tip: Some organizations have policies requiring separate resource groups for different resource types (compute vs storage vs networking). If your organization has such policies, discuss with your cloud governance team before deploying!


๐Ÿ“ Step 4: Create Your .env File

Do this now so you can fill it in as you go through the next steps!

Why create this file now?

  • ๐Ÿ“ Document as you go - Fill in values while fresh in your mind
  • ๐Ÿ”„ Easy redeployment - One file with everything you need
  • ๐Ÿ‘ฅ Team reference - Share the template (without secrets!)
  • ๐Ÿงช Local testing - Run the app locally later

Quick start: Copy the example file and edit it:

# Copy the example file to .env
copy .env.example .env

# Or on Mac/Linux:
cp .env.example .env

Then open .env and fill in your actual values. Hereโ€™s what the file contains:

# =================================================================
# CORA Voice Agent - Configuration Template
# =================================================================
# Fill in YOUR values as you complete the steps below
# This file is for local development and as reference
# =================================================================

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# Step 3: Azure Account Information
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# Your Azure subscription ID (from Step 3: az account show)
AZURE_SUBSCRIPTION_ID=

# Your preferred Azure region (we recommend eastus)
AZURE_LOCATION=eastus

# Your environment name - used by azd for tracking
# Keep it simple: dev, test, prod (or cora-dev, cora-test, etc.)
# This is NOT the resource group name, but they should align!
AZURE_ENV_NAME=dev

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# Step 5: Resource Group Planning
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# Your resource group name (will be created in Module 2)
# Should align with your environment name above
# Pattern: rg-cora-{AZURE_ENV_NAME}
# Example: if AZURE_ENV_NAME=dev, then use rg-cora-dev
RESOURCE_GROUP=rg-cora-dev

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# Step 6: Azure AI Foundry Configuration  
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# Paste your Foundry endpoint URL here (from Step 6)
AZURE_AI_FOUNDRY_ENDPOINT=

# Your GPT model deployment name (from Step 6)
AZURE_AI_MODEL_NAME=gpt-4o

# Optional: API Key (only needed for local development)
# If deploying to Azure, Managed Identity is used automatically
# AZURE_AI_FOUNDRY_API_KEY=

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# Auto-populated by azd (leave empty for now)
# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
# APPLICATIONINSIGHTS_CONNECTION_STRING=

๐Ÿ“‹ How to Use This Template:

  1. Create the file now - Copy the template above into .env
  2. Fill in Step 3 values - Add your subscription ID from az account show
  3. Skip to Step 6 - Leave AI Foundry fields empty for now
  4. Come back and fill them - After creating your Foundry project in Step 6

โš ๏ธ Security Notes:

  • โœ… .env is in .gitignore (wonโ€™t be committed to Git)
  • โŒ Never share API keys in screenshots
  • ๐Ÿ”’ Azure deployment uses Managed Identity (no API keys!)
  • ๐Ÿ’ก For team sharing, remove any API key values before sharing

๐Ÿ“ฆ Step 5: Plan Your Resource Group

Critical Planning Step: Before creating any Azure resources, letโ€™s plan where everything will live.

Why Resource Groups Matter

Think of a resource group as a folder for your Azure resources. Everything for this project should go in the same resource group:

โœ… Benefits of keeping everything together:

  • ๐Ÿงน Easy cleanup: Delete the resource group = delete everything (no orphaned resources!)
  • ๐Ÿ’ฐ Cost tracking: See total cost for the entire project in one place
  • ๐Ÿ” Security management: Grant access to the whole project with one permission assignment
  • ๐Ÿ“Š Organization: All related resources grouped logically

Resource Group Naming

Recommended naming convention:

rg-cora-{environment}

Examples:
  AZURE_ENV_NAME=dev    โ†’  RESOURCE_GROUP=rg-cora-dev
  AZURE_ENV_NAME=test   โ†’  RESOURCE_GROUP=rg-cora-test
  AZURE_ENV_NAME=prod   โ†’  RESOURCE_GROUP=rg-cora-prod

๐Ÿ’ก Keep them aligned: Your AZURE_ENV_NAME and RESOURCE_GROUP should match conceptually:

  • Environment name (AZURE_ENV_NAME): Simple name for azd tracking (e.g., dev, test)
  • Resource group (RESOURCE_GROUP): Azure resource container following naming conventions (e.g., rg-cora-dev)

Recommended pattern: Use dev for env name and rg-cora-dev for resource group.

๐Ÿ’ก Fill this in: Go back to your .env file and make sure both values align:

AZURE_ENV_NAME=dev
RESOURCE_GROUP=rg-cora-dev

Good news: When you run azd up in Module 2, it will automatically create the resource group for you! But itโ€™s important to understand why we use this pattern.

Resources That Will Live Together

In Module 2, these will all be created in one resource group:

  • Container Apps Environment
  • Container App (your web application)
  • Container Registry (stores Docker images)
  • Storage Account (conversation scores)
  • Log Analytics Workspace (logs)
  • Application Insights (monitoring)

๐Ÿ’ก Pro Tip: Some organizations have policies requiring separate resource groups for different resource types (compute vs storage vs networking). If your organization has such policies, discuss with your cloud governance team before deploying!


๐Ÿค– Step 6: Azure AI Foundry Project Setup

You need an Azure AI Foundry project with a deployed GPT model.

Important: When creating your AI Foundry project, use the same resource group you planned in Step 5, or be ready to specify an existing one.

Option A: You Already Have a Project

If your organization provided a project, you need to get:

  1. Project Endpoint
    • Format: https://your-project.cognitiveservices.azure.com/
    • Found in: Azure Portal โ†’ Your AI Foundry Project โ†’ Overview โ†’ Endpoint
  2. Model Deployment Name
    • The name you gave your GPT deployment (e.g., gpt-4o, gpt-4o-mini)
    • Found in: AI Foundry Studio โ†’ Deployments
Azure AI Foundry Endpoint

Click to enlarge

AI Foundry Model Deployment

Click to enlarge

Option B: Create a New Project

If you need to create your own AI Foundry project:

Portal Experience Note ๐Ÿ”„

Azure AI Foundry has two portal experiences:

  • New Experience (default): Modern UI with updated navigation
  • Legacy Experience: Classic UI with familiar layout

For this training: Our screenshots use the legacy experience for consistency. You can toggle between experiences using the switcher at the top of the portal.

๐Ÿ’ก Pro Tip: Both experiences work identically - itโ€™s just different layouts for the same functionality!

Step-by-Step Setup

  1. Navigate to Azure AI Foundry
  2. Create a New Project
    • Click + New project (or + Create new project in new experience)
    • Youโ€™ll see the project creation form
  3. Fill in Project Details:

    Field What to Enter Why This Matters
    Project name cora-voice-agent Identifies your project in the portal
    Subscription Select your Azure subscription Where costs will be billed
    Resource group Select or create rg-cora-dev CRITICAL: Use the same resource group for everything!
    Location East US or East US 2 Must support both AI and Container Apps
    AI Services Create new or use existing Creates the underlying OpenAI resource

    ๐Ÿ” Location tip: Stick with East US/East US 2 for best service availability!

  4. Configure Application Insights
    • When prompted about Application Insights, select โ€œEnableโ€
    • This sets up telemetry collection for monitoring
    • Why? In Module 6, weโ€™ll use this for advanced observability and tracing
    • Default settings are fine for now
  5. Click Create
    • Azure provisions your AI Foundry project (~2-3 minutes)
    • Wait for โ€œDeployment succeededโ€ notification
  6. Copy Your Endpoint ๐Ÿ“‹

    Critical step - add this to your .env file!

    After project creation:

    • Go to project Overview page
    • Find the Endpoint field (format: https://your-project.openai.azure.com/)
    • Copy this URL and paste it into your .env file as AZURE_AI_FOUNDRY_ENDPOINT
    Azure AI Foundry Project Overview

    Click to enlarge

  7. Deploy a GPT Model

    • Navigate to Deployments (left sidebar)
    • Click + Create deployment or + Deploy model
    • Configure deployment:

      Setting Value Notes
      Model gpt-4o or gpt-4o-mini gpt-4o-mini is cheaper for testing
      Deployment name gpt-4o Keep it simple - use model name
      Model version Latest Auto-updates to newest version
      Deployment type Standard Default option
    • Click Deploy
    • Wait for deployment to complete (~1-2 minutes)
    • Add the deployment name to your .env file as AZURE_AI_MODEL_NAME
    GPT Model Deployment

    Click to enlarge

About API Keys ๐Ÿ”‘

Youโ€™ll notice Azure AI Foundry provides API keys after deployment. You wonโ€™t need them for this training!

Why?

  • Weโ€™re using Managed Identity for authentication (more secure)
  • No keys to rotate, manage, or accidentally commit to Git
  • Azure handles authentication automatically between services

When you would use API keys:

  • Accessing the model from outside Azure (e.g., local development)
  • Quick testing with REST API clients
  • Legacy applications not using managed identity

โš ๏ธ Security Best Practice: If you ever need to use API keys, always store them in Azure Key Vault, never in code or configuration files. Azure Key Vault provides secure storage, access control, and audit logging for secrets.

For CORA: Managed Identity handles everything automatically in Module 2! ๐ŸŽ‰

Cost Note: GPT-4o charges per token. Budget approximately:

  • Development/Testing: ~$5-20/month
  • Production: Varies by usage

Token Cost Reference:

  • gpt-4o: ~$5 per 1M input tokens, ~$15 per 1M output tokens
  • gpt-4o-mini: ~$0.15 per 1M input tokens, ~$0.60 per 1M output tokens

๐Ÿ’ก Cost Tip: Start with gpt-4o-mini for training - itโ€™s 97% cheaper!


โœ… Step 7: Verify Youโ€™re Ready

Before moving to Module 2 (deployment), confirm you have:

  • โœ… Repository code on your local machine (Git clone or ZIP download)
  • โœ… Azure CLI installed and logged in (az login successful)
  • โœ… Subscription ID identified and added to .env
  • โœ… Resource group naming pattern decided (e.g., rg-cora-dev)
  • โœ… .env file created with Steps 3 and 5 completed
  • โœ… Azure AI Foundry project created with GPT model deployed
  • โœ… AI Foundry endpoint URL added to .env file
  • โœ… Model deployment name added to .env file

๐Ÿ”ฎ Whatโ€™s Next: Validation Across Modules

Donโ€™t worry if youโ€™re not 100% sure everything is correct! Weโ€™ll validate and explore your setup in detail throughout the training:

๐Ÿ“ฆ Module 2: Infrastructure Validation

  • Verify all Azure resources deployed correctly
  • Check Container Apps, Storage, Registry, Log Analytics
  • Confirm resource group organization
  • Test endpoint URLs

๐Ÿš€ Module 3: Application Validation

  • Test the deployed web application
  • Verify conversation functionality
  • Confirm voice features work
  • Check analytics dashboard

๐Ÿง  Module 4: AI Foundry & Model Validation

  • Deep dive into your Foundry project
  • Test model responses in Playground
  • Verify conversation scoring
  • Explore OpenTelemetry traces
  • Confirm cost and performance metrics

๐Ÿ’ก Bottom Line: If something isnโ€™t quite right in Module 1, weโ€™ll catch it and fix it in the upcoming modules. Each module builds on and validates the previous work!


๐Ÿ—๏ธ What Youโ€™ll Deploy in Module 2

Now that youโ€™re set up, hereโ€™s what will be created when you deploy:

Azure Resources

Resource Purpose Estimated Cost Why This?
Container Apps Environment Hosting platform for your web app ~$10/month ๐ŸŽฏ Scales to $0 when idle!
Container App Runs your voice agent application Included ๐Ÿ’ช WebSocket-ready
Container Registry Stores your Docker images ~$5/month ๐Ÿ“ฆ Private & secure
Storage Account Stores conversation scores <$1/month ๐Ÿ’ฐ Cheapest option
Log Analytics Workspace Collects logs and metrics ~$3/month ๐Ÿ” First 5GB free
Application Insights Monitoring and telemetry Free ๐Ÿ“Š Because blind deployments are scary

Total Estimated Cost: ~$18-25/month for development environment

๐Ÿ’ก Pro Tip: The Container App can scale to zero when idle = Netflix money saved! ๐ŸŽฌ


๐ŸŽญ Architectural Story Time: Why These Choices?

Or: โ€œHow to sound smart in architecture review meetingsโ€

Letโ€™s talk about why we made specific technology choices. Spoiler alert: Itโ€™s not just because theyโ€™re shiny and new. ๐ŸŒŸ

๐ŸฅŠ The Great Platform Battle: Container Apps vs The World

The Contenders:

  • ๐Ÿƒ Azure Container Apps (Our Champion!)
  • ๐Ÿฆธ Azure App Service (The Reliable Veteran)
  • โšก Azure Functions (The Speed Demon)
  • ๐Ÿšข Azure Kubernetes Service (The โ€œI Have a Team of DevOps Engineersโ€)
  • ๐ŸŽจ Low-code (The โ€œMy Boss Saw This Demoโ€)

The Ultimate Showdown:

Feature Container Apps App Service Functions AKS Low-Code
WebSocket Support โœ… Perfect โœ… Works โŒ โ€œThatโ€™s not my jobโ€ โœ… Yes โŒ Nope
Scale to Zero โœ… $0 when idle! โŒ Always hungry โœ… Yes โŒ Always running โœ… Varies
Setup Complexity โœ… Easy โœ… Easy โœ… Easy โŒ PhD required โœ… Point & click
Control Level โœ… Full control โœ… Full control โš ๏ธ Stateless life โœ… EVERYTHING โŒ โ€œYou canโ€™t do thatโ€
Monthly Cost (idle) $0 ๐ŸŽ‰ ~$50 ๐Ÿ’ธ $0 ~$200 ๐Ÿ’€ ~$5-20

Why Container Apps Wins This Round:

๐ŸŽฏ Reason #1: WebSockets Are Not Negotiable

Customer: "I want to talk to the AI in real-time!"
Functions: "Best I can do is check back every 5 seconds."
Container Apps: "Let's have a conversation!"

๐Ÿ’ฐ Reason #2: The CFO Will Love You

Traditional App Service:
  Monday-Friday: Running ($$$)
  Weekend: Still running ($$$ for nothing!)
  Your vacation: Still running ($$$ while you're at the beach!)

Container Apps:
  In use: Running ($$$)
  Idle: Asleep ($0 - literally zero!)
  Your boss: ๐Ÿ˜Š

๐ŸŽ“ Reason #3: Production Path Is Smooth

  • Same platform from dev โ†’ test โ†’ prod
  • No โ€œworks on my machineโ€ surprises
  • No re-architecture needed when traffic grows
  • Your future self will thank you ๐Ÿ™

When to Pick the Alternatives:

๐Ÿฆธ App Service - When:

  • Your team already manages 50 App Services
  • โ€œIf it ainโ€™t brokeโ€ฆโ€ is your company motto
  • You like paying for compute youโ€™re not using (we donโ€™t judge)

โšก Functions - When:

  • Youโ€™re building a โ€œprocess this fileโ€ app
  • Stateless is your love language
  • You enjoy debugging cold starts

๐Ÿšข AKS - When:

  • You have a Kubernetes expert on speed dial
  • Your architecture diagram looks like a city map
  • You enjoy YAML files (lots of them)

๐ŸŽจ Low-Code - When:

  • Your app is basically a fancy form
  • โ€œCan you make this button blue?โ€ is your biggest challenge
  • Real-time features are not on the menu

๐Ÿ—๏ธ Infrastructure as Code: Because Clicking is for Chumps

The Eternal Debate:

  • ๐Ÿ‘† Click through Azure Portal (The Manual Labor Approach)
  • ๐Ÿ“ Write Bicep templates (The Smart Personโ€™s Move)

Letโ€™s Do Some Math:

Scenario: Deploy to 3 environments (Dev, Test, Prod)

Manual Clicking Method:
  โฑ๏ธ  First environment: 45 minutes of clicking
  โฑ๏ธ  Second environment: 45 minutes (click... click... click...)
  โฑ๏ธ  Third environment: 45 minutes (are we done yet?)
  โฑ๏ธ  Fix a typo in all three: 1 hour (oops, which button was it?)
  โฑ๏ธ  Disaster recovery: Half a day (what did we click again?)
  ๐ŸŽฏ  Total: 3.5 hours + anxiety
  ๐Ÿ˜“  Risk of RSI: High

Bicep IaC Method:
  โฑ๏ธ  Write template once: 30 minutes
  โฑ๏ธ  Deploy all three: 15 minutes (azd up ร— 3)
  โฑ๏ธ  Fix typo everywhere: 2 minutes (change 1 line, redeploy)
  โฑ๏ธ  Disaster recovery: 5 minutes (azd up again)
  ๐ŸŽฏ  Total: 52 minutes + confidence
  ๐Ÿ˜Ž  Risk of RSI: Low (more time for coffee)

But Wait, Thereโ€™s More!

๐Ÿ“š Version Control:

Portal Clicking:
  Boss: "What changed last Tuesday?"
  You: "Uh... I think I clicked... something?"
  
Bicep with Git:
  Boss: "What changed last Tuesday?"
  You: "Here's the exact commit with explanation and code review."
  Boss: *promotes you*

๐Ÿ”’ Security & Compliance:

Portal Clicking:
  Auditor: "Show me your infrastructure configuration."
  You: *takes 50 screenshots*
  
Bicep Templates:
  Auditor: "Show me your infrastructure configuration."
  You: "Here's the repo. Everything's documented, versioned, and reviewed."
  Auditor: *smiles* (they never smile!)

๐Ÿ’ฐ Cost Control:

Portal Clicking:
  Finance: "Why did our Azure bill double?"
  You: "Someone probably clicked Premium instead of Basic?"
  
Bicep Templates:
  Finance: "Why did our Azure bill double?"
  You: "Impossible. It's in the code. Line 42. Someone would need to commit a change."
  (Spoiler: It was Kevin. It's always Kevin.)

๐Ÿš€ Azure Developer CLI: The โ€œDeployโ€ Button We Always Wanted

The Old Way:

# Step 1: Create resource group
az group create --name rg-cora-dev --location eastus

# Step 2: Deploy infrastructure
az deployment group create --resource-group rg-cora-dev --template-file infra/main.bicep --parameters @parameters.json

# Step 3: Build container
az acr build --registry myregistry --image app:v1 src/

# Step 4: Update container app
az containerapp update --name myapp --resource-group rg-cora-dev --image myregistry.azurecr.io/app:v1

# Steps 5-15: More commands...
# Step 16: Realize you forgot something
# Step 17: Start over
# Step 18: Question career choices

The azd Way:

azd up

Thatโ€™s it. Seriously. โœจ

What Just Happened?

  • โœ… Created resource groups
  • โœ… Deployed all infrastructure
  • โœ… Built Docker images
  • โœ… Pushed to registry
  • โœ… Deployed application
  • โœ… Configured environment variables
  • โœ… Secured secrets
  • โœ… Gave you deployment URLs
  • โœ… Made you look good in standup

For Your Team:

Junior Dev: "How do I deploy to test?"
You: "azd env select test && azd up"
Junior Dev: "That's it?"
You: "That's it."
Junior Dev: *mind blown* ๐Ÿคฏ

Senior Architect: "What about the database connection?"
You: "In the Bicep template. Auto-configured."
Architect: *nods approvingly*

Manager: "Can we replicate this for other projects?"
You: "Already did. Same pattern."
Manager: "Promotion time."

๐Ÿ” Managed Identity: The โ€œDelete All Your Secretsโ€ Strategy

The Debate:

  • ๐Ÿ”‘ API Keys (The Traditional โ€œPlease Donโ€™t Leak Thisโ€ Method)
  • ๐ŸŽญ Managed Identity (The โ€œWe Live in the Futureโ€ Method)

Comparison Time:

API Key Approach:
  Step 1: Generate API key
  Step 2: Store in Key Vault
  Step 3: Grant app access to Key Vault
  Step 4: App reads key from Key Vault
  Step 5: App uses key to call service
  Step 6: Rotate key every 90 days
  Step 7: Update Key Vault
  Step 8: Restart apps
  Step 9: Get paged at 2 AM because rotation broke prod
  Step 10: Reconsider life choices

Managed Identity Approach:
  Step 1: Enable managed identity (checkbox)
  Step 2: Grant identity access to service (one command)
  Step 3: Done!
  Step 4-10: Go home on time

The Real Kicker:

๐Ÿ”“ When Someone Says โ€œThe Key Leakedโ€:

API Key Scenario:
  Security Team: "The key is in a GitHub commit from 3 months ago!"
  You: *panic*
  You: *revoke key*
  You: *generate new key*
  You: *update Key Vault*
  You: *restart all services*
  You: *update documentation*
  You: *send postmortem*
  You: *update resume*

Managed Identity Scenario:
  Security Team: "The key is in... wait, there is no key."
  You: *sips coffee peacefully* โ˜•

๐Ÿ’ฐ The Math:

API Key Management (Annual):
  Key Vault: $0.03 per 10K operations = ~$200/year
  Staff Time: 4 hours/quarter rotating keys = ~$5,000/year
  Incident Response: 1 leaked key/year = ~$10,000/year
  Total: ~$15,200/year
  
Managed Identity:
  Azure AD: FREE
  Staff Time: 0 hours
  Incident Response: Can't leak what doesn't exist
  Total: $0/year
  Savings: ~$15,200/year (that's a nice conference budget!)

๐ŸŽฏ Why This Architecture Scales (Without Breaking Your Budget)

The Secret Sauce: We designed this like a LEGO set, not a monolith.

The Old Way (Monolith):

Everything in one big app:
  Problem: Need to scale AI processing?
  Solution: Scale EVERYTHING (including the HTML)
  Result: Paying for CPU to serve static images ๐Ÿคฆ

The Smart Way (This Solution):

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Frontend   โ”‚ โ† Scales independently (or move to CDN for pennies)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  API Layer  โ”‚ โ† Scales 1-100 instances based on traffic
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  AI Layer   โ”‚ โ† Microsoft scales this (not your problem!)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Storage    โ”‚ โ† Infinite scale (seriously, try to break it)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Real Talk Example:

Black Friday Traffic Spike:

Monolith:
  9 AM: 10 users โ†’ 1 server ($50/day)
  10 AM: 100 users โ†’ "Server melting..." โ†’ Emergency scale โ†’ 5 servers ($250/day)
  11 AM: 1000 users โ†’ "EVERYTHING IS ON FIRE" โ†’ 20 servers ($1,000/day)
  12 PM: Traffic drops โ†’ Still running 20 servers โ†’ Still paying $1,000/day
  Next Day: Manually scale down โ†’ Pray you got it right
  
Container Apps (This Solution):
  9 AM: 10 users โ†’ Scales up โ†’ $5/day
  10 AM: 100 users โ†’ Scales up more โ†’ $15/day
  11 AM: 1000 users โ†’ Auto-scales to 20 instances โ†’ $50/day
  12 PM: Traffic drops โ†’ Auto-scales down โ†’ $10/day
  Next Day: Already at right size โ†’ $5/day
  You: *sleeping peacefully*

๐ŸŽจ Code vs Low-Code: The Honest Conversation

When Your Manager Says: โ€œWhy canโ€™t we just use [Low-Code Platform]?โ€

Hereโ€™s your diplomatic response (backed by facts):

Low-Code is GREAT for:

  • โœ… โ€œI need a form to collect vacation requestsโ€
  • โœ… โ€œCan you connect Excel to SharePoint?โ€
  • โœ… โ€œThe marketing team needs a simple dashboardโ€
  • โœ… โ€œWe need this by Fridayโ€ (and itโ€™s really simple)

Code is NECESSARY for:

  • โœ… โ€œI need real-time bidirectional communicationโ€ (this app!)
  • โœ… โ€œWe need custom AI logicโ€
  • โœ… โ€œPerformance is criticalโ€
  • โœ… โ€œWeโ€™re expecting 10,000+ concurrent usersโ€
  • โœ… โ€œWe need to integrate with 7 different APIs, 3 databases, and a carrier pigeonโ€

The Real Comparison:

Question Low-Code Answer Code Answer
โ€œCan it do WebSockets?โ€ โ€œWhatโ€™s a WebSocket?โ€ โ€œYes, and hereโ€™s the code.โ€
โ€œCan it scale to 100K users?โ€ โ€œHave you triedโ€ฆ fewer users?โ€ โ€œYes, and hereโ€™s the load test.โ€
โ€œCan we customize the AI logic?โ€ โ€œYou get what you get.โ€ โ€œMake it however you want.โ€
โ€œWhat if we need to migrate?โ€ โ€œYouโ€™re locked in, baby!โ€ โ€œExport and go.โ€
โ€œCan my nephew maintain this?โ€ โ€œMaybe!โ€ โ€œIf they know Python, yes.โ€

The Hybrid Approach (Best of Both Worlds):

Smart companies use BOTH:

Low-Code Frontend (Power Apps):
  "Submit a training request"
      โ†“ calls API
Code Backend (This Solution):
  Complex AI + Real-time chat + Analytics
      โ†“ stores data
Low-Code Dashboard (Power BI):
  "Look at pretty charts"

Everyone wins! ๐ŸŽ‰


๐Ÿ“š Understanding Azure AI Foundry

Now that weโ€™ve had fun with architecture, letโ€™s get serious for a momentโ€ฆ

What is Azure AI Foundry?

Azure AI Foundry (formerly Azure AI Studio) is Microsoftโ€™s unified platform for:

  • Building and deploying AI applications
  • Managing AI models and deployments
  • Orchestrating agents and multi-agent workflows
  • Evaluating AI performance
  • Implementing responsible AI practices

How is it Different from Azure OpenAI?

Azure OpenAI Service Azure AI Foundry
Just the GPT API Complete AI development platform
Single model calls Agents, orchestration, evaluation
Basic deployment Full lifecycle management
Limited tooling Integrated development environment

Think of it this way:

  • Azure OpenAI = Just the GPT engine
  • Azure AI Foundry = The full development studio + engine + tools

๐ŸŽฏ Real-World Use Cases

1. Customer Service Training

  • New hire onboarding
  • Skills refreshers for experienced agents
  • Testing new scripts or procedures
  • Performance benchmarking

2. Quality Assurance

  • Evaluate agent performance objectively
  • Identify training gaps
  • Compare agent effectiveness
  • Monitor improvement trends

3. Scenario Testing

  • Test edge cases (angry customers, complex issues)
  • Practice difficult conversations safely
  • Experiment with different approaches
  • Build confidence before real interactions

๐ŸŽฌ Demo: What Youโ€™ll Build

๐Ÿ“ธ Screenshot/GIF placeholder: Animated demo of the completed application

  • Landing page with authentication
  • Conversation interface with voice/text options
  • Mood selector (happy, frustrated, curious, etc.)
  • Live chat interaction
  • Analytics dashboard with charts

Key Features:

  • ๐ŸŽค Voice or Text Input (voice on desktop browsers only)
  • ๐Ÿ’ฌ Real-time Conversation via WebSockets
  • ๐ŸŽญ Mood-based Scenarios (6 different customer personalities)
  • ๐Ÿ“Š Performance Analytics (5-point scoring across 5 criteria)
  • ๐Ÿ” Azure AD Authentication (Easy Auth integration)
  • ๐Ÿ“ˆ Progress Tracking (historical scores with charts)

๐Ÿ”— Resources

Azure Documentation

Code References

Learning Resources


โ“ Troubleshooting

โ€œaz loginโ€ fails

Problem: Browser doesnโ€™t open or authentication fails

Solutions:

  • Try az login --use-device-code for manual code entry
  • Check if your organization requires VPN
  • Verify you have an Azure account with active subscription
  • Clear browser cache and try again

Canโ€™t find Azure AI Foundry endpoint

Problem: Not sure where to get the endpoint URL

Solutions:

  1. Go to Azure Portal
  2. Search for your AI Foundry project name
  3. Click on the resource
  4. Look for โ€œEndpointโ€ in the Overview or Keys and Endpoint section
  5. Should look like: https://<project-name>.cognitiveservices.azure.com/

Repository clone fails

Problem: Git clone command doesnโ€™t work

Solutions:


๐Ÿ“ Knowledge Check

Before moving to Module 2, test your understanding:

  1. What are the three main folders in the repository?
    Click to reveal answer
    • src/ (application code)
    • infra/ (Azure infrastructure templates)
    • docs/ (training website)

    </details>

  2. What information do you need from Azure AI Foundry?
    Click to reveal answer
    • Project endpoint URL
    • Model deployment name (e.g., gpt-4o-deployment)

    </details>

  3. What tool will you use to deploy in Module 2?
    Click to reveal answer Azure Developer CLI (azd)
  4. What does CORA stand for?
    Click to reveal answer Customer-Oriented Response Agent - and it's the name of OUR application, not an industry acronym!

๐ŸŽ“ Summary

In this module, you:

  • โœ… Cloned the training repository
  • โœ… Understood the code structure (src/, infra/, docs/)
  • โœ… Logged in to Azure CLI
  • โœ… Identified your AI Foundry project endpoint
  • โœ… Prepared for deployment

Next up: Module 2 will walk you through deploying everything to Azure with a single command: azd up