Skip to content

Commit 521ba9e

Browse files
refactor: Agent framework v2 changes
2 parents a1f8053 + 7c668a9 commit 521ba9e

58 files changed

Lines changed: 3453 additions & 3711 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-KMGeneric.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
echo "Generated SOLUTION_PREFIX: ${UNIQUE_SOLUTION_PREFIX}"
119119
- name: Determine Tag Name Based on Branch
120120
id: determine_tag
121-
run: echo "tagname=${{ github.ref_name == 'main' && 'latest_waf' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.ref_name == 'dependabotchanges' && 'dependabotchanges' || 'latest_waf' }}" >> $GITHUB_OUTPUT
121+
run: echo "tagname=${{ github.ref_name == 'main' && 'latest_afv2' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.ref_name == 'dependabotchanges' && 'dependabotchanges' || 'latest_afv2' }}" >> $GITHUB_OUTPUT
122122
- name: Deploy Bicep Template
123123
id: deploy
124124
run: |

.github/workflows/docker-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
id: determine_tag
6262
run: |
6363
if [[ "${{ github.ref_name }}" == "main" ]]; then
64-
echo "tagname=latest_waf" >> $GITHUB_OUTPUT
64+
echo "tagname=latest_afv2" >> $GITHUB_OUTPUT
6565
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
6666
echo "tagname=dev" >> $GITHUB_OUTPUT
6767
elif [[ "${{ github.ref_name }}" == "demo" ]]; then

.github/workflows/job-azure-deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,8 @@ jobs:
456456
echo "Current branch: $BRANCH_NAME"
457457
458458
if [[ "$BRANCH_NAME" == "main" ]]; then
459-
IMAGE_TAG="latest_waf"
460-
echo "Using main branch - image tag: latest_waf"
459+
IMAGE_TAG="latest_afv2"
460+
echo "Using main branch - image tag: latest_afv2"
461461
elif [[ "$BRANCH_NAME" == "dev" ]]; then
462462
IMAGE_TAG="dev"
463463
echo "Using dev branch - image tag: dev"
@@ -471,8 +471,8 @@ jobs:
471471
IMAGE_TAG="dependabotchanges"
472472
echo "Using dependabotchanges branch - image tag: dependabotchanges"
473473
else
474-
IMAGE_TAG="latest_waf"
475-
echo "Using default for branch '$BRANCH_NAME' - image tag: latest_waf"
474+
IMAGE_TAG="latest_afv2"
475+
echo "Using default for branch '$BRANCH_NAME' - image tag: latest_afv2"
476476
fi
477477
478478
echo "Using existing Docker image tag: $IMAGE_TAG"

.github/workflows/job-deploy-linux.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,39 @@ jobs:
339339
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
340340
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
341341

342+
- name: Run Create Agents Scripts
343+
id: run_create_agents_scripts
344+
continue-on-error: true
345+
shell: bash
346+
run: |
347+
echo "Running run_create_agents_scripts.sh..."
348+
bash ./infra/scripts/run_create_agents_scripts.sh
349+
echo "✅ Create agents scripts completed successfully."
350+
351+
- name: Re-authenticate with Azure before retry (refresh OIDC token)
352+
if: steps.run_create_agents_scripts.outcome == 'failure'
353+
uses: azure/login@v2
354+
with:
355+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
356+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
357+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
358+
359+
- name: Retry Run Create Agents Scripts
360+
if: steps.run_create_agents_scripts.outcome == 'failure'
361+
shell: bash
362+
run: |
363+
echo "⚠️ First attempt failed. Retrying run_create_agents_scripts.sh..."
364+
sleep 20
365+
bash ./infra/scripts/run_create_agents_scripts.sh
366+
echo "✅ Create agents scripts completed successfully on retry."
367+
368+
- name: Re-authenticate with Azure before processing sample data (refresh OIDC token)
369+
uses: azure/login@v2
370+
with:
371+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
372+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
373+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
374+
342375
- name: Process Sample Data
343376
id: process_sample_data
344377
continue-on-error: true
@@ -394,6 +427,7 @@ jobs:
394427
echo "- **Container Web App URL**: [${{ env.WEB_APP_URL }}](${{ env.WEB_APP_URL }})" >> $GITHUB_STEP_SUMMARY
395428
echo "- **Container API App URL**: [${{ env.API_APP_URL }}](${{ env.API_APP_URL }})" >> $GITHUB_STEP_SUMMARY
396429
echo "- Successfully deployed to Azure with all resources configured" >> $GITHUB_STEP_SUMMARY
430+
echo "- Agents created and configured successfully" >> $GITHUB_STEP_SUMMARY
397431
echo "- Schemas registered and sample data uploaded successfully" >> $GITHUB_STEP_SUMMARY
398432
else
399433
echo "### ❌ Deployment Failed" >> $GITHUB_STEP_SUMMARY

.github/workflows/job-deploy-windows.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,43 @@ jobs:
364364
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
365365
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
366366

367+
- name: Run Create Agents Scripts
368+
id: run_create_agents_scripts
369+
continue-on-error: true
370+
shell: bash
371+
env:
372+
PYTHONIOENCODING: utf-8
373+
run: |
374+
echo "Running run_create_agents_scripts.sh..."
375+
bash ./infra/scripts/run_create_agents_scripts.sh
376+
echo "✅ Create agents scripts completed successfully."
377+
378+
- name: Re-authenticate with Azure before retry (refresh OIDC token)
379+
if: steps.run_create_agents_scripts.outcome == 'failure'
380+
uses: azure/login@v2
381+
with:
382+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
383+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
384+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
385+
386+
- name: Retry Run Create Agents Scripts
387+
if: steps.run_create_agents_scripts.outcome == 'failure'
388+
shell: bash
389+
env:
390+
PYTHONIOENCODING: utf-8
391+
run: |
392+
echo "⚠️ First attempt failed. Retrying run_create_agents_scripts.sh..."
393+
sleep 20
394+
bash ./infra/scripts/run_create_agents_scripts.sh
395+
echo "✅ Create agents scripts completed successfully on retry."
396+
397+
- name: Re-authenticate with Azure before processing sample data (refresh OIDC token)
398+
uses: azure/login@v2
399+
with:
400+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
401+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
402+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
403+
367404
- name: Process Sample Data
368405
id: process_sample_data
369406
continue-on-error: true
@@ -435,6 +472,7 @@ jobs:
435472
echo "- **Container Web App URL**: [${{ env.WEB_APP_URL }}](${{ env.WEB_APP_URL }})" >> $GITHUB_STEP_SUMMARY
436473
echo "- **Container API App URL**: [${{ env.API_APP_URL }}](${{ env.API_APP_URL }})" >> $GITHUB_STEP_SUMMARY
437474
echo "- Successfully deployed to Azure with all resources configured" >> $GITHUB_STEP_SUMMARY
475+
echo "- Agents created and configured successfully" >> $GITHUB_STEP_SUMMARY
438476
echo "- Schemas registered and sample data uploaded successfully" >> $GITHUB_STEP_SUMMARY
439477
else
440478
echo "### ❌ Deployment Failed" >> $GITHUB_STEP_SUMMARY

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Analysts working with large volumes of conversational data can use this solution
2222
Solution overview
2323
</h2>
2424

25-
Leverages Azure Content Understanding, Foundry IQ, Azure OpenAI Service, Semantic Kernel, Azure SQL Database, and Cosmos DB to process large volumes of conversational data. Audio and text inputs are analyzed through event-driven pipelines to extract and vectorize key information, orchestrate intelligent responses, and power an interactive web front-end for exploring insights using natural language.
25+
Leverages Azure Content Understanding, Foundry IQ, Azure OpenAI Service, Azure AI Agent Framework, Azure SQL Database, and Cosmos DB to process large volumes of conversational data. Audio and text inputs are analyzed through event-driven pipelines to extract and vectorize key information, orchestrate intelligent responses, and power an interactive web front-end for exploring insights using natural language.
2626

2727
### Solution architecture
2828
|![image](./documents/Images/ReadMe/solution-architecture.png)|
@@ -101,14 +101,13 @@ _Note: This is not meant to outline all costs as selected SKUs, scaled use, cust
101101
| [Microsoft Foundry](https://learn.microsoft.com/en-us/azure/ai-foundry) | Used to orchestrate and build AI workflows that combine Azure AI services. | Free Tier | [Pricing](https://azure.microsoft.com/pricing/details/ai-studio/) |
102102
| [Foundry IQ](https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search) | Powers vector-based semantic search for retrieving indexed conversation data. | Standard S1; costs scale with document count and replica/partition settings. | [Pricing](https://azure.microsoft.com/pricing/details/search/) |
103103
| [Azure Storage Account](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview) | Stores transcripts, intermediate outputs, and application assets. | Standard LRS; usage-based cost by storage/operations. | [Pricing](https://azure.microsoft.com/pricing/details/storage/blobs/) |
104-
| [Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/general/overview) | Secures secrets, credentials, and keys used across the application. | Standard Tier; cost per operation (e.g., secret retrieval). | [Pricing](https://azure.microsoft.com/pricing/details/key-vault/) |
104+
105105
| [Azure AI Services (OpenAI)](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/overview) | Enables language understanding, summarization, entity extraction, and chat capabilities using GPT models. | S0 Tier; pricing depends on token volume and model used (e.g., GPT-4o-mini). | [Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/) |
106106
| [Azure Container Apps](https://learn.microsoft.com/en-us/azure/container-apps/overview) | Hosts microservices and APIs powering the front-end and backend orchestration. | Consumption plan with 0.5 vCPU, 1GiB memory; includes a free usage tier. | [Pricing](https://azure.microsoft.com/pricing/details/container-apps/) |
107107
| [Azure Container Registry](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-intro) | Stores and serves container images used by Azure Container Apps. | Basic Tier; fixed daily cost per registry. | [Pricing](https://azure.microsoft.com/pricing/details/container-registry/) |
108108
| [Azure Monitor / Log Analytics](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/log-analytics-overview) | Collects and analyzes telemetry and logs from services and containers. | Pay-as-you-go; charges based on data ingestion volume. | [Pricing](https://azure.microsoft.com/pricing/details/monitor/) |
109109
| [Azure SQL Database](https://learn.microsoft.com/en-us/azure/azure-sql/database/sql-database-paas-overview) | Stores structured data including insights, metadata, and indexed results. | General Purpose Tier; can be provisioned or serverless. Fixed cost if provisioned. | [Pricing](https://azure.microsoft.com/pricing/details/azure-sql-database/single/) |
110110
| [Azure Cosmos DB](https://learn.microsoft.com/en-us/azure/cosmos-db/introduction) | Used for fast, globally distributed NoSQL data storage for chat history and vector metadata. | Autoscale or provisioned throughput; fixed minimum cost if provisioned. | [Pricing](https://azure.microsoft.com/en-us/pricing/details/cosmos-db/autoscale-provisioned/) |
111-
| [Azure Functions](https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview) | Executes lightweight, serverless backend logic and event-driven workflows. | Consumption Tier; billed per execution and duration. | [Pricing](https://azure.microsoft.com/en-us/pricing/details/functions/) |
112111

113112

114113
<br/>
@@ -173,9 +172,7 @@ Supporting documentation
173172

174173
### Security guidelines
175174

176-
This solution uses [Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/general/overview) to securely store secrets, connection strings, and API keys required by application components.
177-
178-
It also leverages [Managed Identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) for secure access to Azure resources during local development and production deployment, eliminating the need for hard-coded credentials.
175+
This solution leverages [Managed Identity](https://learn.microsoft.com/en-us/entra/identity/managed-identities-azure-resources/overview) for secure access to Azure resources during local development and production deployment, eliminating the need for hard-coded credentials.
179176

180177
To maintain strong security practices, it is recommended that GitHub repositories built on this solution enable [GitHub secret scanning](https://docs.github.com/code-security/secret-scanning/about-secret-scanning) to detect accidental secret exposure.
181178

azure.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ hooks:
1818
run: |
1919
Write-Host "Web app URL: "
2020
Write-Host "$env:WEB_APP_URL" -ForegroundColor Cyan
21-
Write-Host "`nCreate and activate a virtual environment if not already done, then run the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
21+
22+
Write-Host "`nCreate and activate a virtual environment if not already done, then run the following command in the bash terminal to create agents:"
23+
Write-Host "bash ./infra/scripts/run_create_agents_scripts.sh" -ForegroundColor Cyan
24+
Write-Host "`nRun the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
2225
Write-Host "bash ./infra/scripts/process_sample_data.sh" -ForegroundColor Cyan
2326
shell: pwsh
2427
continueOnError: false
@@ -27,8 +30,11 @@ hooks:
2730
run: |
2831
echo "Web app URL: "
2932
echo $WEB_APP_URL
33+
34+
echo "\nCreate and activate a virtual environment if not already done, then run the following command in the bash terminal to create agents:"
35+
echo "bash ./infra/scripts/run_create_agents_scripts.sh"
3036
echo ""
31-
echo "Create and activate a virtual environment if not already done, then run the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
37+
echo "\nRun the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
3238
echo "bash ./infra/scripts/process_sample_data.sh"
3339
shell: sh
3440
continueOnError: false

azure_custom.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,27 @@ services:
2525
hooks:
2626
postprovision:
2727
windows:
28+
run: |
29+
Write-Host "Web app URL: "
30+
Write-Host "$env:WEB_APP_URL" -ForegroundColor Cyan
31+
32+
Write-Host "`nCreate and activate a virtual environment if not already done, then run the following command in the bash terminal to create agents:"
33+
Write-Host "bash ./infra/scripts/run_create_agents_scripts.sh" -ForegroundColor Cyan
34+
Write-Host "`nRun the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
35+
Write-Host "bash ./infra/scripts/process_sample_data.sh" -ForegroundColor Cyan
2836
shell: pwsh
2937
continueOnError: false
3038
interactive: true
31-
run: |
32-
Write-Host "Web app URL: $env:WEB_APP_URL" -ForegroundColor Cyan
33-
Write-Host "`nRun the following command in bash, if sample data needs to be processed:`nbash ./infra/scripts/process_sample_data.sh" -ForegroundColor Yellow
3439
posix:
35-
shell: sh
36-
continueOnError: false
37-
interactive: true
3840
run: |
39-
echo "Web app URL: $WEB_APP_URL"
41+
echo "Web app URL: "
42+
echo $WEB_APP_URL
43+
44+
echo "\nCreate and activate a virtual environment if not already done, then run the following command in the bash terminal to create agents:"
45+
echo "bash ./infra/scripts/run_create_agents_scripts.sh"
4046
echo ""
41-
echo "Run the following command in bash, if sample data needs to be processed:"
47+
echo "\nRun the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
4248
echo "bash ./infra/scripts/process_sample_data.sh"
49+
shell: sh
50+
continueOnError: false
51+
interactive: true

docs/workshop/docs/workshop/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
azure-identity==1.21.0
33
azure-ai-evaluation==1.5.0
44
# Additional utilities
5-
semantic-kernel[azure]==1.28.0
5+
semantic-kernel[azure]==1.40.0
66
azure-ai-projects==1.0.0b8
77
openai==1.74.0
88
pyodbc==5.2.0

0 commit comments

Comments
 (0)