Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
0c4c3b5
Update
howieleung Oct 22, 2025
d7ea215
agent creation
howieleung Oct 23, 2025
2b731e8
Implement reusable function for conversation management in chat API
howieleung Oct 23, 2025
1fe6bf1
Refactor conversation handling to return Conversation object and save…
howieleung Oct 24, 2025
817d4ab
Refactor get_available_tool to enable index search for Azure AI and s…
howieleung Oct 24, 2025
592fa16
Update error message for missing agent and enhance created_at metadat…
howieleung Oct 24, 2025
e418096
Update Azure AI agent configuration and enhance Application Insights …
howieleung Oct 24, 2025
bd67eb0
Refactor Dockerfile and docker-compose configuration; update requirem…
howieleung Oct 25, 2025
49afea2
Refactor save_created_at function to simplify error handling and remo…
howieleung Oct 25, 2025
0433934
replace whl
howieleung Oct 30, 2025
32806d2
read teaming
howieleung Oct 30, 2025
b932f0f
Update docker-compose configuration, add Azure AI package, and remove…
howieleung Oct 30, 2025
eb8d440
update for instrumentation
howieleung Nov 3, 2025
badabfb
update lib
howieleung Nov 5, 2025
984c189
eval and red teaming
howieleung Nov 5, 2025
c692c30
Refactor agent retrieval methods to use updated API calls and update …
howieleung Nov 8, 2025
fd715ab
Enhance annotation processing in preprocessContent function and strea…
howieleung Nov 9, 2025
756d860
Update README and deployment documentation for Foundry Tools; refacto…
howieleung Nov 11, 2025
88b76d1
Update
howieleung Oct 22, 2025
d6b6c46
agent creation
howieleung Oct 23, 2025
eecccd3
Implement reusable function for conversation management in chat API
howieleung Oct 23, 2025
b314414
Refactor conversation handling to return Conversation object and save…
howieleung Oct 24, 2025
a9af894
Refactor get_available_tool to enable index search for Azure AI and s…
howieleung Oct 24, 2025
aee258a
Update error message for missing agent and enhance created_at metadat…
howieleung Oct 24, 2025
f1dca56
Update Azure AI agent configuration and enhance Application Insights …
howieleung Oct 24, 2025
4bc6b20
Refactor Dockerfile and docker-compose configuration; update requirem…
howieleung Oct 25, 2025
d8010fd
Refactor save_created_at function to simplify error handling and remo…
howieleung Oct 25, 2025
edddc88
replace whl
howieleung Oct 30, 2025
efb588d
read teaming
howieleung Oct 30, 2025
fcb58ee
Update docker-compose configuration, add Azure AI package, and remove…
howieleung Oct 30, 2025
1afd8de
update for instrumentation
howieleung Nov 3, 2025
8f96b99
update lib
howieleung Nov 5, 2025
53fd568
eval and red teaming
howieleung Nov 5, 2025
e06b4ea
Refactor agent retrieval methods to use updated API calls and update …
howieleung Nov 8, 2025
4864ceb
Enhance annotation processing in preprocessContent function and strea…
howieleung Nov 9, 2025
0e59378
Update README and deployment documentation for Foundry Tools; refacto…
howieleung Nov 11, 2025
64d3055
Refactor timestamp handling in AgentPreview component; add formatTime…
howieleung Nov 13, 2025
4dd056b
Refactor agent initialization and output handling; add AZURE_TENANT_I…
howieleung Nov 13, 2025
44eb8dd
Fix bugs
howieleung Nov 13, 2025
d92b67a
improve citation for AI Search
howieleung Nov 13, 2025
29c7263
remove redirect back temporary.
howieleung Nov 13, 2025
879555c
roll back image
howieleung Nov 13, 2025
b127771
Updated readme
howieleung Nov 14, 2025
261675e
update
howieleung Nov 14, 2025
660ef6d
update library
howieleung Nov 14, 2025
513dfe4
update readme and eval
howieleung Nov 15, 2025
fb60542
update role
howieleung Nov 15, 2025
85f3f7e
Merge branch 'howie/agents-v2' of https://github.com/Azure-Samples/ge…
aprilk-ms Nov 15, 2025
39e0200
update
howieleung Nov 15, 2025
a5b04b3
update
howieleung Nov 15, 2025
f9a470c
update cont eval
howieleung Nov 15, 2025
8a58e9c
update tests with .env file path, update md
howieleung Nov 15, 2025
499aaf1
use projects b2
howieleung Nov 15, 2025
68bc697
restore region
howieleung Nov 15, 2025
5b7e607
Merge branch 'howie/agents-v2' of https://github.com/Azure-Samples/ge…
aprilk-ms Nov 16, 2025
d441af6
Apply suggestions from code review
howieleung Nov 16, 2025
78d64de
Changel labels
howieleung Nov 16, 2025
8271156
update eval
howieleung Nov 16, 2025
a2830ca
doc update
howieleung Nov 16, 2025
8ab2df3
update doc
howieleung Nov 16, 2025
4a7734a
Merge branch 'howie/agents-v2' of https://github.com/Azure-Samples/ge…
aprilk-ms Nov 16, 2025
205f00b
updates
aprilk-ms Nov 16, 2025
94f8280
update
aprilk-ms Nov 16, 2025
eb4b683
Use ApiKey
howieleung Nov 16, 2025
6fc7b42
Merge pull request #192 from aprilk-ms/aprilk/eval-updates-1116
howieleung Nov 16, 2025
05a0700
fix ai search
howieleung Nov 16, 2025
5e07941
update searchConnectionId parameter to searchConnectionId_final
howieleung Nov 16, 2025
e16a016
updates
aprilk-ms Nov 17, 2025
39a6bf9
update readme
aprilk-ms Nov 17, 2025
a179c1a
update
aprilk-ms Nov 17, 2025
1fb197e
Update dependencies and improve Dockerfile for frontend build
howieleung Nov 17, 2025
b9ebb90
Merge pull request #193 from aprilk-ms/aprilk/final-touches-agentsv2
howieleung Nov 17, 2025
61d07b8
Resolve comment
howieleung Nov 17, 2025
a5e9abf
improve doc
howieleung Nov 17, 2025
39a7a47
Update deployment guide to reflect changes in Azure AI Foundry quota …
howieleung Nov 17, 2025
f373416
update 4O
howieleung Nov 17, 2025
3eb3389
restucturdd observability docs
changliu2 Nov 18, 2025
0446e0b
removed eval & red-teaming .py script
changliu2 Nov 18, 2025
1e77e47
added back eval & red-teaming .py script
changliu2 Nov 18, 2025
5a06915
relinked README.md to observability.dm
changliu2 Nov 18, 2025
6a9d6de
Merge pull request #195 from changliu2/cliu_updates
howieleung Nov 18, 2025
a0aa721
fix links and better instructions for red teaming
howieleung Nov 18, 2025
6a8090a
eval update
howieleung Nov 18, 2025
9904e1b
update annotation label to use title instead of url
howieleung Nov 18, 2025
29d2709
remove # Version is optional. Defaults to latest version if not spec…
howieleung Nov 18, 2025
ad9ec8e
refactor: remove unnecessary comment about reasoning model in initial…
howieleung Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- main

# Set up permissions for deploying with secretless Azure federated credentials
# https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication
# https://learn.microsoft.com/azure/developer/github/connect-from-azure?tabs=azure-portal%2Clinux#set-up-azure-login-with-openid-connect-authentication
permissions:
id-token: write
contents: read
Expand Down
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
# Getting Started with Agents Using Azure AI Foundry

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.
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.

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

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

</div>

**Note**: 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).

## Solution Overview

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

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.
The agent leverages the Foundry 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.

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.
This solution creates a Microsoft 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.

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

### Solution Architecture

![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)
![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, Microsoft Foundry Project, Foundry Tools, Storage account, Azure Container App, and Log Analytics Workspace.](docs/images/architecture.png)

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.
The app code runs in an Azure Container App to process user input and generate a response to the user. It leverages Microsoft Foundry projects and Foundry Tools, including the model and agent.

### Key Features

Expand All @@ -32,17 +34,20 @@ The AI agent uses file search or Azure AI Search to retrieve knowledge from uplo
- **[Customizable AI Model Deployment](./docs/deploy_customization.md#customizing-model-deployments)**<br/>
The solution allows users to configure and deploy AI models, such as gpt-4o-mini, with options to adjust model capacity, and knowledge retrieval methods.

- **[Built-in Monitoring and Tracing](./docs/other_features.md#tracing-and-monitoring)**<br/>
- **[Built-in Monitoring and Tracing](./docs/observability.md#tracing-and-monitoring)**<br/>
Integrated monitoring capabilities, including Azure Monitor and Application Insights, enable tracing and logging for easier troubleshooting and performance optimization.

- **[Flexible Deployment Options](./docs/deployment.md)**<br/>
The solution supports deployment through GitHub Codespaces, VS Code Dev Containers, or local environments, providing flexibility for different development workflows.

- **[Agent Evaluation](./docs/other_features.md#agent-evaluation)**<br/>
This solution demonstrates how you can evaluate your agent's performance and quality during local development and incorporate it into monitoring and CI/CD workflow.
- **[Continuous Evaluation](./docs/observability.md#continuous-evaluation)**<br/>
Proactively monitor and assess your agent's performance over time with continuous evaluation that automatically checks real-world interactions to identify potential issues before they impact users.

- **[Agent Evaluation](./docs/observability.md#agent-evaluation)**<br/>
This solution demonstrates how you can evaluate your agent's performance and quality through Pytest.

- **[AI Red Teaming Agent](./docs/other_features.md#ai-red-teaming-agent)**<br/>
Facilitates the creation of an AI Red Teaming Agent that can run batch automated scans for safety and security scans on your Agent solution to check your risk posture before deploying it into production.
- **[AI Red Teaming Agent](./docs/observability.md#ai-red-teaming-agent)**<br/>
Facilitates the creation of an AI Red Teaming Agent through Pytest that can run batch automated scans for safety and security on your Agent solution to check your risk posture before deploying it into production.

<br/>

Expand Down Expand Up @@ -111,9 +116,9 @@ The majority of the Azure resources used in this infrastructure are on usage-bas

You can try the [Azure pricing calculator](https://azure.microsoft.com/pricing/calculator) for the resources:

- **Azure AI Foundry**: Free tier. [Pricing](https://azure.microsoft.com/pricing/details/ai-studio/)
- **Microsoft Foundry**: Free tier. [Pricing](https://azure.microsoft.com/pricing/details/ai-studio/)
- **Azure Storage Account**: Standard tier, LRS. Pricing is based on storage and operations. [Pricing](https://azure.microsoft.com/pricing/details/storage/blobs/)
- **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/)
- **Foundry Tools**: S0 tier, defaults to gpt-4o-mini. Pricing is based on token count. [Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/)
- **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/)
- **Log analytics**: Pay-as-you-go tier. Costs based on data ingested. [Pricing](https://azure.microsoft.com/pricing/details/monitor/)
- **Agent Evaluations**: Incurs the cost of your provided model deployment used for local evaluations.
Expand All @@ -135,7 +140,7 @@ You may want to consider additional security measures, such as:

> **Important Security Notice** <br/>
This template, the application code and configuration it contains, has been built to showcase Microsoft Azure specific services and tools. We strongly advise our customers not to make this code part of their production environments without implementing or enabling additional security features. <br/><br/>
For a more comprehensive list of best practices and security recommendations for Intelligent Applications, [visit our official documentation](https://learn.microsoft.com/en-us/azure/ai-foundry/).
For a more comprehensive list of best practices and security recommendations for Intelligent Applications, [visit our official documentation](https://learn.microsoft.com/azure/ai-foundry/).

### Resources

Expand Down
6 changes: 3 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).

Expand All @@ -36,6 +36,6 @@ We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
107 changes: 0 additions & 107 deletions airedteaming/ai_redteaming.py

This file was deleted.

4 changes: 2 additions & 2 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

name: azd-get-started-with-ai-agents
metadata:
template: azd-get-started-with-ai-agents@1.0.4
template: azd-get-started-with-ai-agents@2.0.0b1
requiredVersions:
azd: ">=1.14.0"

Expand Down Expand Up @@ -85,4 +85,4 @@ pipeline:
- AZURE_EXISTING_AIPROJECT_ENDPOINT
- AZURE_EXISTING_AGENT_ID
- ENABLE_AZURE_MONITOR_TRACING
- AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED
- OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT
2 changes: 1 addition & 1 deletion docs/deploy_customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To override any of those resource names, run `azd env set <key> <value>` before

## Customizing model deployments

For more information on the Azure OpenAI models and non-Microsoft models that can be used in your deployment, view the [list of models supported by Azure AI Agent Service](https://learn.microsoft.com/azure/ai-services/agents/concepts/model-region-support).
For more information on the Azure OpenAI models and non-Microsoft models that can be used in your deployment, view the [list of models supported by Foundry Agent Service](https://learn.microsoft.com/azure/ai-services/agents/concepts/model-region-support).

To customize the model deployments, you can set the following environment variables:

Expand Down
Loading