Skip to content

Commit 88ee0c8

Browse files
refactor: Agent framework v2 changes.
2 parents b0a95ab + 67f9f46 commit 88ee0c8

49 files changed

Lines changed: 2413 additions & 2804 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"

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

documents/AVMPostDeploymentGuide.md

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,36 @@ cd Conversation-Knowledge-Mining-Solution-Accelerator
5858

5959
---
6060

61-
### Step 2: Run the Data Processing Script
61+
### Step 2: Create and Activate Python Virtual Environment
6262

63-
#### 2.1 Login to Azure
63+
#### 2.1 Create a Python Virtual Environment
64+
65+
```shell
66+
python -m venv .venv
67+
```
68+
69+
#### 2.2 Activate the Virtual Environment
70+
71+
**For Windows (PowerShell):**
72+
```powershell
73+
.venv\Scripts\Activate.ps1
74+
```
75+
76+
**For Windows (Bash):**
77+
```bash
78+
source .venv/Scripts/activate
79+
```
80+
81+
**For Linux/macOS/VS Code Web (Bash):**
82+
```bash
83+
source .venv/bin/activate
84+
```
85+
86+
---
87+
88+
### Step 3: Create AI Agents
89+
90+
#### 3.1 Login to Azure
6491

6592
```shell
6693
az login
@@ -71,7 +98,19 @@ az login
7198
> az login --use-device-code
7299
> ```
73100
74-
#### 2.2 Execute the Script
101+
#### 3.2 Execute the Agent Creation Script
102+
103+
Run the bash script from the output of the AVM deployment:
104+
105+
```bash
106+
bash ./infra/scripts/run_create_agents_scripts.sh <Resource-Group-Name>
107+
```
108+
109+
> ⚠️ **Important**: Replace `<Resource-Group-Name>` with your actual resource group name from the deployment.
110+
111+
---
112+
113+
### Step 4: Process Sample Data
75114

76115
Run the bash script from the output of the AVM deployment:
77116

@@ -83,7 +122,7 @@ bash ./infra/scripts/process_sample_data.sh <Resource-Group-Name>
83122
84123
---
85124

86-
### Step 3: Access the Application
125+
### Step 5: Access the Application
87126

88127
1. Navigate to the [Azure Portal](https://portal.azure.com)
89128
2. Open the **resource group** created during deployment
@@ -93,13 +132,13 @@ bash ./infra/scripts/process_sample_data.sh <Resource-Group-Name>
93132

94133
---
95134

96-
### Step 4: Configure Authentication (Optional)
135+
### Step 6: Configure Authentication (Optional)
97136

98137
If you want to enable authentication for your application, follow the [App Authentication Guide](./AppAuthentication.md).
99138

100139
---
101140

102-
### Step 5: Verify Data Processing
141+
### Step 7: Verify Data Processing
103142

104143
Confirm your deployment is working correctly:
105144

@@ -111,7 +150,7 @@ Confirm your deployment is working correctly:
111150

112151
---
113152

114-
### 6. Customize with Your Own Data (Optional)
153+
### Step 8: Customize with Your Own Data (Optional)
115154

116155
To replace the sample data with your own conversational data, follow these steps:
117156

@@ -149,7 +188,7 @@ bash ./infra/scripts/process_custom_data.sh \
149188
<AI-Search-Name> <Search-Endpoint> \
150189
<AI-Foundry-Resource-ID> <CU-Foundry-Resource-ID> \
151190
<OpenAI-Endpoint> <Embedding-Model> <Deployment-Model> \
152-
<CU-Endpoint> <AI-Agent-Endpoint> <CU-API-Version>
191+
<CU-Endpoint> <CU-API-Version> <AI-Agent-Endpoint> <Solution-Name>
153192
```
154193

155194
#### VM Access for WAF Deployments

documents/CustomizeData.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If you would like to update the solution to leverage your own data please follow
3131
<AI-Search-Name> <Search-Endpoint> \
3232
<AI-Foundry-Resource-ID> <CU-Foundry-Resource-ID> \
3333
<OpenAI-Endpoint> <Embedding-Model> <Deployment-Model> \
34-
<CU-Endpoint> <AI-Agent-Endpoint> <CU-API-Version>
34+
<CU-Endpoint> <CU-API-Version> <AI-Agent-Endpoint> <Solution-Name>
3535
```
3636
3737
## How to Login to VM Using Azure Bastion

documents/CustomizingAzdParameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ By default this template will use the environment name as the prefix to prevent
1919
| `AZURE_OPENAI_API_VERSION` | string | `2025-01-01-preview` | Specifies the API version for Azure OpenAI. |
2020
| `AZURE_OPENAI_DEPLOYMENT_MODEL_CAPACITY` | integer | `30` | Sets the GPT model capacity. |
2121
| `AZURE_OPENAI_EMBEDDING_MODEL` | string | `text-embedding-ada-002` | Sets the name of the embedding model to use. |
22-
| `AZURE_ENV_IMAGETAG` | string | `latest_waf` | Sets the image tag (`latest_waf`, `dev`, `hotfix`, etc.). |
22+
| `AZURE_ENV_IMAGETAG` | string | `latest_afv2` | Sets the image tag (`latest_afv2`, `dev`, `hotfix`, etc.). |
2323
| `AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Sets the capacity for the embedding model deployment. |
2424
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | Guide to get your [Existing Workspace ID](/documents/re-use-log-analytics.md) | Reuses an existing Log Analytics Workspace instead of creating a new one. |
2525
| `USE_LOCAL_BUILD` | string | `false` | Indicates whether to use a local container build for deployment. |

documents/DeploymentGuide.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,34 @@ az login
345345
az login --use-device-code
346346
```
347347
348-
**4. Run the sample data processing script:**
348+
**4. Run the create agent script:**
349+
350+
The `azd up` deployment output includes a ready-to-use bash script command. Look for the script in the deployment output and run it:
351+
352+
```bash
353+
bash ./infra/scripts/run_create_agents_scripts.sh
354+
```
355+
356+
**If you don't have `azd env` configured**, you'll need to pass parameters manually. The parameters are grouped by service for clarity:
357+
358+
```bash
359+
bash ./infra/scripts/run_create_agents_scripts.sh \
360+
<resource-group> \
361+
<project-endpoint> <solution-name> <gpt-model-name> \
362+
<ai-foundry-resource-id> <api-app-name> \
363+
<azure-ai-search-connection-name> <azure-ai-search-index>
364+
```
365+
366+
**Parameter Descriptions:**
367+
- **Resource Group Parameters:** Azure resource group name
368+
- **AI Foundry Parameters:** AI Foundry project endpoint URL and resource ID
369+
- **Solution Parameters:** Solution deployment name
370+
- **AI Model Parameters:** Deployed GPT model name
371+
- **Application Parameters:** API application name
372+
- **Search Parameters:** Azure AI Search connection name and index name
373+
374+
375+
**5. Run the sample data processing script:**
349376
350377
The `azd up` deployment output includes a ready-to-use bash script command. Look for the script in the deployment output and run it:
351378
@@ -363,7 +390,7 @@ bash ./infra/scripts/process_sample_data.sh \
363390
<AI-Search-Name> <Search-Endpoint> \
364391
<AI-Foundry-Resource-ID> <CU-Foundry-Resource-ID> \
365392
<OpenAI-Endpoint> <Embedding-Model> <Deployment-Model> \
366-
<CU-Endpoint> <AI-Agent-Endpoint> <CU-API-Version> <Use-Case>
393+
<CU-Endpoint> <CU-API-Version> <AI-Agent-Endpoint> <Use-Case> <Solution-Name>
367394
```
368395
369396
**Parameter Descriptions:**
@@ -375,6 +402,7 @@ bash ./infra/scripts/process_sample_data.sh \
375402
- **OpenAI Parameters:** OpenAI endpoint, embedding model name, and deployment model name
376403
- **Content Understanding Parameters:** CU endpoint, AI agent endpoint, CU API version
377404
- **Use Case:** Either `telecom` or `IT_helpdesk`
405+
- **Solution Parameters:** Solution deployment name
378406
379407
> **Note:** All parameter values are available in the Azure Portal by navigating to your deployed resources, or from the `azd env get-values` command output.
380408

documents/LocalDevelopmentSetup.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,12 @@ AZURE_EXISTING_AI_PROJECT_RESOURCE_ID=<ai-project-resource-id>
532532
AZURE_AI_AGENT_ENDPOINT=<ai-agent-endpoint>
533533
AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME=<agent-model-deployment>
534534

535+
# Agent Framework v2 Configuration (Set by deployment)
536+
AI_FOUNDRY_RESOURCE_ID=<ai-foundry-resource-id>
537+
API_APP_NAME=<api-app-name>
538+
AGENT_NAME_CONVERSATION=<conversation-agent-name>
539+
AGENT_NAME_TITLE=<title-agent-name>
540+
535541
# Azure AI Search Configuration
536542
AZURE_AI_SEARCH_ENDPOINT=<search-endpoint>
537543
AZURE_AI_SEARCH_INDEX=call_transcripts_index
@@ -573,6 +579,7 @@ REACT_APP_LAYOUT_CONFIG=<layout-config-json>
573579
> - Set `APP_ENV=dev` for local development. This enables Azure CLI authentication.
574580
> - Ensure you're logged in via `az login` before running the backend.
575581
> - Set `APP_ENV=prod` only when deploying to Azure App Service with Managed Identity.
582+
> - **Agent Framework v2 Variables**: The `AI_FOUNDRY_RESOURCE_ID` and `API_APP_NAME` are automatically set during `azd up`. The `AGENT_NAME_CONVERSATION` and `AGENT_NAME_TITLE` are populated when you run the `run_create_agents_scripts.sh` script (see Step 4.4 in [Deployment Guide](./DeploymentGuide.md)).
576583
577584
### 4.3. Install Backend API Dependencies
578585

0 commit comments

Comments
 (0)