Skip to content

Commit 8af60e0

Browse files
committed
Update README and deployment documentation for Foundry Tools; refactor agent preview to handle multiple completed messages; adjust Bicep templates for search connection; update requirements for new package version.
1 parent fd715ab commit 8af60e0

14 files changed

+84
-289
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
# Getting Started with Agents Using Azure AI Foundry
22

3-
The agent leverages the Azure AI Agent service and utilizes file search for knowledge retrieval from uploaded files, enabling it to generate responses with citations. The solution also includes built-in monitoring capabilities with tracing to ensure easier troubleshooting and optimized performance.
3+
The agent leverages Foundry Agent Service and utilizes file search for knowledge retrieval from uploaded files, enabling it to generate responses with citations. The solution also includes built-in monitoring capabilities with tracing to ensure easier troubleshooting and optimized performance.
44

55
<div style="text-align:center;">
66

77
[**SOLUTION OVERVIEW**](#solution-overview) \| [**GETTING STARTED**](#getting-started) \| [**LOCAL DEVELOPMENT**](#local-development) \| [**OTHER FEATURES**](#other-features) \| [**RESOURCE CLEAN-UP**](#resource-clean-up) \| [**GUIDANCE**](#guidance) \| [**TROUBLESHOOTING**](./docs/troubleshooting.md)
88

99
</div>
1010

11+
With any AI solutions you create using these templates, you are responsible for assessing all associated risks, and for complying with all applicable laws and safety standards. Learn more in the transparency documents for [Agent Service](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fazure%2Fai-foundry%2Fresponsible-ai%2Fagents%2Ftransparency-note&data=05%7C02%7Chowieleung%40microsoft.com%7C42645ec29da244bd920508de2095bcad%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638984024651276233%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=Un4HtoksTeodWPQMQp7zh8BNW6j%2BeIw4mcs6gbS4e6E%3D&reserved=0) and [Agent Framework](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fagent-framework%2Fblob%2Fmain%2FTRANSPARENCY_FAQ.md&data=05%7C02%7Chowieleung%40microsoft.com%7C42645ec29da244bd920508de2095bcad%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638984024651325701%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=19nfzxn8ZN1qr7Hy77fn%2BgFXD1sc%2BXiuPuUi3H2NNz4%3D&reserved=0).
12+
1113
## Solution Overview
1214

1315
This solution deploys a web-based chat application with an AI agent running in Azure Container App.
1416

1517
The agent leverages the Azure AI Agent service and utilizes Azure AI Search for knowledge retrieval from uploaded files, enabling it to generate responses with citations. The solution also includes built-in monitoring capabilities with tracing to ensure easier troubleshooting and optimized performance.
1618

17-
This solution creates an Azure AI Foundry project and Azure AI services. More details about the resources can be found in the [resources](#resources) documentation. There are options to enable logging, tracing, and monitoring.
19+
This solution creates an Azure AI Foundry project and Foundry Tools. More details about the resources can be found in the [resources](#resources) documentation. There are options to enable logging, tracing, and monitoring.
1820

1921
Instructions are provided for deployment through GitHub Codespaces, VS Code Dev Containers, and your local development environment.
2022

2123
### Solution Architecture
2224

23-
![Architecture diagram showing that user input is provided to the Azure Container App, which contains the app code. With user identity and resource access through managed identity, the input is used to form a response. The input and the Azure monitor are able to use the Azure resources deployed in the solution: Application Insights, Azure AI Foundry Project, Azure AI Services, Storage account, Azure Container App, and Log Analytics Workspace.](docs/images/architecture.png)
25+
![Architecture diagram showing that user input is provided to the Azure Container App, which contains the app code. With user identity and resource access through managed identity, the input is used to form a response. The input and the Azure monitor are able to use the Azure resources deployed in the solution: Application Insights, Azure AI Foundry Project, Foundry Tools, Storage account, Azure Container App, and Log Analytics Workspace.](docs/images/architecture.png)
2426

25-
The app code runs in Azure Container App to process the user input and generate a response to the user. It leverages Azure AI projects and Azure AI services, including the model and agent.
27+
The app code runs in Azure Container App to process the user input and generate a response to the user. It leverages Azure AI projects and Foundry Tools, including the model and agent.
2628

2729
### Key Features
2830

@@ -121,7 +123,7 @@ You can try the [Azure pricing calculator](https://azure.microsoft.com/pricing/c
121123
122124
- **Azure AI Foundry**: Free tier. [Pricing](https://azure.microsoft.com/pricing/details/ai-studio/)
123125
- **Azure Storage Account**: Standard tier, LRS. Pricing is based on storage and operations. [Pricing](https://azure.microsoft.com/pricing/details/storage/blobs/)
124-
- **Azure AI Services**: S0 tier, defaults to gpt-4o-mini. Pricing is based on token count. [Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/)
126+
- **Foundry Tools**: S0 tier, defaults to gpt-4o-mini. Pricing is based on token count. [Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/)
125127
- **Azure Container App**: Consumption tier with 0.5 CPU, 1GiB memory/storage. Pricing is based on resource allocation, and each month allows for a certain amount of free usage. [Pricing](https://azure.microsoft.com/pricing/details/container-apps/)
126128
- **Log analytics**: Pay-as-you-go tier. Costs based on data ingested. [Pricing](https://azure.microsoft.com/pricing/details/monitor/)
127129
- **Agent Evaluations**: Incurs the cost of your provided model deployment used for local evaluations.

docs/deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ When you start a deployment, most parameters will have default values. You can c
184184

185185
| **Setting** | **Description** | **Default value** |
186186
|------------|----------------| ------------|
187-
| **Existing Project Resource ID** | Specify an existing project resource ID to be used instead of provisioning new Azure AI Foundry project and Azure AI services. | |
187+
| **Existing Project Resource ID** | Specify an existing project resource ID to be used instead of provisioning new Azure AI Foundry project and Foundry Tools. | |
188188
| **Azure Region** | Select a region with quota which supports your selected model. | |
189189
| **Model** | Choose from the [list of models supported by Azure AI Agent Service](https://learn.microsoft.com/azure/ai-services/agents/concepts/model-region-support) for your selected region. | gpt-4o-mini |
190190
| **Model Format** | Choose from OpenAI or Microsoft, depending on your model. | OpenAI |

docs/images/architecture.png

438 Bytes
Loading

infra/api.bicep

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ param agentID string
1717
param enableAzureMonitorTracing bool
1818
param otelInstrumentationGenAICaptureMessageContent bool
1919
param projectEndpoint string
20+
param searchConnectionId string
2021

2122
resource apiIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
2223
name: identityName
@@ -80,6 +81,10 @@ var env = [
8081
name: 'AZURE_EXISTING_AIPROJECT_ENDPOINT'
8182
value: projectEndpoint
8283
}
84+
{
85+
name: 'SEARCH_CONNECTION_ID'
86+
value: searchConnectionId
87+
}
8388
]
8489

8590

infra/core/search/search-services.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,5 @@ output id string = search.id
9797
output endpoint string = 'https://${name}.search.windows.net/'
9898
output name string = search.name
9999
output principalId string = !empty(searchIdentityProvider) ? search.identity.principalId : ''
100-
output searchConnectionId string = ''
100+
output searchConnectionId string = !empty(searchIdentityProvider) ? aiServices::project::searchConnection.id : ''
101101

infra/main.bicep

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ param aiAgentID string = ''
5555
@description('ID of the existing agent')
5656
param azureExistingAgentId string = ''
5757
@description('Name of the chat model to deploy')
58-
param agentModelName string = 'gpt-4o-mini'
58+
param agentModelName string = 'gpt-4o'
5959
@description('Name of the model deployment')
60-
param agentDeploymentName string = 'gpt-4o-mini'
60+
param agentDeploymentName string = 'gpt-4o'
6161

6262
@description('Version of the chat model to deploy')
6363
// See version availability in this table:
@@ -201,6 +201,11 @@ var searchServiceEndpoint = !useSearchService
201201
? ''
202202
: empty(azureExistingAIProjectResourceId) ? ai!.outputs.searchServiceEndpoint : ''
203203

204+
var searchConnectionId = !useSearchService
205+
? ''
206+
: empty(azureExistingAIProjectResourceId) ? ai!.outputs.searchConnectionId : ''
207+
208+
204209
// If bringing an existing AI project, set up the log analytics workspace here
205210
module logAnalytics 'core/monitor/loganalytics.bicep' = if (!empty(azureExistingAIProjectResourceId)) {
206211
name: 'logAnalytics'
@@ -289,6 +294,7 @@ module api 'api.bicep' = {
289294
enableAzureMonitorTracing: enableAzureMonitorTracing
290295
otelInstrumentationGenAICaptureMessageContent: otelInstrumentationGenAICaptureMessageContent
291296
projectEndpoint: projectEndpoint
297+
searchConnectionId: searchConnectionId
292298
}
293299
}
294300

@@ -418,7 +424,6 @@ module backendRoleAzureAIDeveloperRG 'core/security/role.bicep' = {
418424
output AZURE_RESOURCE_GROUP string = rg.name
419425

420426
// Outputs required for local development server
421-
output AZURE_TENANT_ID string = tenant().tenantId
422427
output AZURE_EXISTING_AIPROJECT_RESOURCE_ID string = projectResourceId
423428
output AZURE_AI_AGENT_DEPLOYMENT_NAME string = agentDeploymentName
424429
output AZURE_AI_SEARCH_CONNECTION_NAME string = searchConnectionName
@@ -438,5 +443,5 @@ output SERVICE_API_IDENTITY_PRINCIPAL_ID string = api.outputs.SERVICE_API_IDENTI
438443
output SERVICE_API_NAME string = api.outputs.SERVICE_API_NAME
439444
output SERVICE_API_URI string = api.outputs.SERVICE_API_URI
440445
output SERVICE_API_ENDPOINTS array = ['${api.outputs.SERVICE_API_URI}']
441-
output SEARCH_CONNECTION_ID string = ''
446+
output SEARCH_CONNECTION_ID string = searchConnectionId
442447
output AZURE_CONTAINER_REGISTRY_ENDPOINT string = containerApps.outputs.registryLoginServer

infra/main.parameters.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@
7878
"value": "${AZURE_AI_AGENT_DEPLOYMENT_CAPACITY=80}"
7979
},
8080
"embeddingDeploymentName": {
81-
"value": "${AZURE_AI_EMBED_DEPLOYMENT_NAME=text-embedding-ada-002}"
81+
"value": "${AZURE_AI_EMBED_DEPLOYMENT_NAME=text-embedding-3-small}"
8282
},
8383
"embedModelFormat": {
8484
"value": "${AZURE_AI_EMBED_MODEL_FORMAT=OpenAI}"
8585
},
8686
"embedModelName": {
87-
"value": "${AZURE_AI_EMBED_MODEL_NAME=text-embedding-ada-002}"
87+
"value": "${AZURE_AI_EMBED_MODEL_NAME=text-embedding-3-small}"
8888
},
8989
"embedModelVersion": {
9090
"value": "${AZURE_AI_EMBED_MODEL_VERSION=1}"
@@ -95,7 +95,7 @@
9595
"embedDeploymentCapacity": {
9696
"value": "${AZURE_AI_EMBED_DEPLOYMENT_CAPACITY=50}"
9797
},
98-
"embeddingDeploymentDimensions": {
98+
"embeddingDeploymentDimensions": {
9999
"value": "${AZURE_AI_EMBED_DIMENSIONS=100}"
100100
},
101101
"apiAppExists": {

scripts/set_default_models.ps1

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)