Skip to content

Commit c7edb49

Browse files
committed
Merge branch 'main' into AVM_WAF_Integration
2 parents c436d8d + dac6207 commit c7edb49

Some content is hidden

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

46 files changed

+401
-409
lines changed

.azdo/pipelines/azure-dev.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Set this to the mainline branch you are using
33
trigger:
44
- main
5-
- master
6-
- feature/azd-semantickernel
75

86
# Azure Pipelines workflow to deploy to Azure using azd
97
# To configure required secrets and service connection for connecting to Azure, simply run `azd pipeline config --provider azdo`

.devcontainer/setupEnv.sh

100644100755
File mode changed.

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
22
max-line-length = 88
33
extend-ignore = E501
4-
exclude = .venv, frontend
4+
exclude = .venv, frontend, src/backend/tests
55
ignore = E203, W503, G004, G200, E402

.github/workflows/azure-dev.yml

Lines changed: 9 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Azure Template Validation
22
on:
33
push:
44
branches:
5-
- dev
65
- main
7-
- feature/azd-semantickernel
86
workflow_dispatch:
97

108
permissions:
@@ -15,69 +13,19 @@ permissions:
1513
jobs:
1614
template_validation_job:
1715
runs-on: ubuntu-latest
18-
name: Template validation
16+
name: template validation
1917
steps:
20-
# Step 1: Checkout the code from your repository
21-
- name: Checkout code
22-
uses: actions/checkout@v4
18+
- uses: actions/checkout@v4
2319

24-
# Step 2: Set up Python
25-
- name: Set up Python
26-
uses: actions/setup-python@v4
27-
with:
28-
python-version: "3.9"
29-
30-
# Step 3: Create and populate the virtual environment
31-
- name: Create virtual environment and install dependencies
32-
run: |
33-
python -m venv .venv
34-
source .venv/bin/activate
35-
python -m pip install --upgrade pip
36-
pip install azure-mgmt-resource azure-identity azure-core azure-mgmt-subscription azure-cli-core
37-
# Install any other dependencies that might be needed
38-
pip freeze > requirements-installed.txt
39-
echo "Virtual environment created with these packages:"
40-
cat requirements-installed.txt
41-
42-
# Step 4: Create azd directory if it doesn't exist
43-
- name: Create azd directory
44-
run: |
45-
mkdir -p ./.azd || true
46-
touch ./.azd/.env || true
47-
48-
# Step 5: Validate the Azure template
49-
- name: Validate Azure Template
50-
uses: microsoft/[email protected]
20+
- uses: microsoft/template-validation-action@Latest
5121
id: validation
5222
env:
53-
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
54-
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
55-
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
56-
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
57-
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
23+
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }}
24+
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }}
25+
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }}
26+
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
27+
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
5828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5929

60-
# Step 6: Debug output in case of failure
61-
- name: Debug on failure
62-
if: failure()
63-
run: |
64-
echo "Validation failed. Checking environment:"
65-
ls -la
66-
if [ -d ".venv" ]; then
67-
echo ".venv directory exists"
68-
ls -la .venv/bin/
69-
else
70-
echo ".venv directory does not exist"
71-
fi
72-
if [ -d "tva_*" ]; then
73-
echo "TVA directory exists:"
74-
find . -name "tva_*" -type d
75-
ls -la $(find . -name "tva_*" -type d)
76-
else
77-
echo "No TVA directory found"
78-
fi
79-
80-
# Step 7: Print the result of the validation
81-
- name: Print result
82-
if: success()
30+
- name: print result
8331
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/docker-build-and-push.yml

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
- dev
1919
- demo
2020
- hotfix
21-
workflow_dispatch:
21+
workflow_dispatch:
2222

2323
jobs:
2424
build-and-push:
@@ -32,14 +32,24 @@ jobs:
3232
uses: docker/setup-buildx-action@v1
3333

3434
- name: Log in to Azure Container Registry
35-
if: ${{ (github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix') }}
35+
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'hotfix' }}
3636
uses: azure/docker-login@v2
3737
with:
3838
login-server: ${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}
3939
username: ${{ secrets.ACR_USERNAME }}
4040
password: ${{ secrets.ACR_PASSWORD }}
4141

42-
- name: Set Docker image tag
42+
- name: Get current date
43+
id: date
44+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
45+
46+
- name: Get registry
47+
id: registry
48+
run: |
49+
echo "ext_registry=${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io'}}" >> $GITHUB_OUTPUT
50+
51+
- name: Determine Tag Name Based on Branch
52+
id: determine_tag
4353
run: |
4454
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
4555
echo "TAG=latest" >> $GITHUB_ENV
@@ -52,24 +62,30 @@ jobs:
5262
else
5363
echo "TAG=pullrequest-ignore" >> $GITHUB_ENV
5464
fi
55-
56-
- name: Build and push Docker images optionally
65+
66+
- name: Set Historical Tag
5767
run: |
58-
cd src/backend
59-
docker build -t ${{ secrets.ACR_LOGIN_SERVER }}/macaebackend:${{ env.TAG }} -f Dockerfile . && \
60-
if [[ "${{ env.TAG }}" == "latest" || "${{ env.TAG }}" == "dev" || "${{ env.TAG }}" == "demo" || "${{ env.TAG }}" == "hotfix" ]]; then
61-
docker push ${{ secrets.ACR_LOGIN_SERVER }}/macaebackend:${{ env.TAG }} && \
62-
echo "Backend image built and pushed successfully."
63-
else
64-
echo "Skipping Docker push for backend with tag: ${{ env.TAG }}"
65-
fi
66-
cd ../frontend
67-
docker build -t ${{ secrets.ACR_LOGIN_SERVER }}/macaefrontend:${{ env.TAG }} -f Dockerfile . && \
68-
if [[ "${{ env.TAG }}" == "latest" || "${{ env.TAG }}" == "dev" || "${{ env.TAG }}" == "demo" || "${{ env.TAG }}" == "hotfix" ]]; then
69-
docker push ${{ secrets.ACR_LOGIN_SERVER }}/macaefrontend:${{ env.TAG }} && \
70-
echo "Frontend image built and pushed successfully."
71-
else
72-
echo "Skipping Docker push for frontend with tag: ${{ env.TAG }}"
73-
fi
68+
DATE_TAG=$(date +'%Y-%m-%d')
69+
RUN_ID=${{ github.run_number }}
70+
# Create historical tag using TAG, DATE_TAG, and RUN_ID
71+
echo "HISTORICAL_TAG=${{ env.TAG }}_${DATE_TAG}_${RUN_ID}" >> $GITHUB_ENV
7472
75-
73+
- name: Build and optionally push Backend Docker image
74+
uses: docker/build-push-action@v6
75+
with:
76+
context: ./src/backend
77+
file: ./src/backend/Dockerfile
78+
push: ${{ env.TAG != 'pullrequest-ignore' }}
79+
tags: |
80+
${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.TAG }}
81+
${{ steps.registry.outputs.ext_registry }}/macaebackend:${{ env.HISTORICAL_TAG }}
82+
83+
- name: Build and optionally push Frontend Docker image
84+
uses: docker/build-push-action@v6
85+
with:
86+
context: ./src/frontend
87+
file: ./src/frontend/Dockerfile
88+
push: ${{ env.TAG != 'pullrequest-ignore' }}
89+
tags: |
90+
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.TAG }}
91+
${{ steps.registry.outputs.ext_registry }}/macaefrontend:${{ env.HISTORICAL_TAG }}

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ The solution leverages Azure OpenAI Service, Azure Container Apps, Azure Cosmos
2525
|![image](./documentation/images/readme/macae-architecture.png)|
2626
|---|
2727

28-
### Application interface
29-
|![image](./documentation/images/readme/macae-application.png)|
30-
|---|
28+
3129

3230
### How to customize
3331
If you'd like to customize the solution accelerator, here are some common areas to start:
@@ -199,6 +197,6 @@ You must also comply with all domestic and international export laws and regulat
199197

200198
You acknowledge that the Software and Microsoft Products and Services (1) are not designed, intended or made available as a medical device(s), and (2) are not designed or intended to be a substitute for professional medical advice, diagnosis, treatment, or judgment and should not be used to replace or as a substitute for professional medical advice, diagnosis, treatment, or judgment. Customer is solely responsible for displaying and/or obtaining appropriate consents, warnings, disclaimers, and acknowledgements to end users of Customer's implementation of the Online Services.
201199

202-
You acknowledge the Software is not subject to SOC 1 and SOC 2 compliance audits. No Microsoft technology, nor any of its component technologies, including the Software, is intended or made available as a substitute for the professional advice, opinion, or judgement of a certified financial services professional. Do not use the Software to replace, substitute, or provide professional financial advice or judgment.
200+
You acknowledge the Software is not subject to SOC 1 and SOC 2 compliance audits. No Microsoft technology, nor any of its component technologies, including the Software, is intended or made available as a substitute for the professional advice, opinion, or judgment of a certified financial services professional. Do not use the Software to replace, substitute, or provide professional financial advice or judgment.
203201

204-
BY ACCESSING OR USING THE SOFTWARE, YOU ACKNOWLEDGE THAT THE SOFTWARE IS NOT DESIGNED OR INTENDED TO SUPPORT ANY USE IN WHICH A SERVICE INTERRUPTION, DEFECT, ERROR, OR OTHER FAILURE OF THE SOFTWARE COULD RESULT IN THE DEATH OR SERIOUS BODILY INJURY OF ANY PERSON OR IN PHYSICAL OR ENVIRONMENTAL DAMAGE (COLLECTIVELY, "HIGH-RISK USE"), AND THAT YOU WILL ENSURE THAT, IN THE EVENT OF ANY INTERRUPTION, DEFECT, ERROR, OR OTHER FAILURE OF THE SOFTWARE, THE SAFETY OF PEOPLE, PROPERTY, AND THE ENVIRONMENT ARE NOT REDUCED BELOW A LEVEL THAT IS REASONABLY, APPROPRIATE, AND LEGAL, WHETHER IN GENERAL OR IN A SPECIFIC INDUSTRY. BY ACCESSING THE SOFTWARE, YOU FURTHER ACKNOWLEDGE THAT YOUR HIGH-RISK USE OF THE SOFTWARE IS AT YOUR OWN RISK.
202+
BY ACCESSING OR USING THE SOFTWARE, YOU ACKNOWLEDGE THAT THE SOFTWARE IS NOT DESIGNED OR INTENDED TO SUPPORT ANY USE IN WHICH A SERVICE INTERRUPTION, DEFECT, ERROR, OR OTHER FAILURE OF THE SOFTWARE COULD RESULT IN THE DEATH OR SERIOUS BODILY INJURY OF ANY PERSON OR IN PHYSICAL OR ENVIRONMENTAL DAMAGE (COLLECTIVELY, "HIGH-RISK USE"), AND THAT YOU WILL ENSURE THAT, IN THE EVENT OF ANY INTERRUPTION, DEFECT, ERROR, OR OTHER FAILURE OF THE SOFTWARE, THE SAFETY OF PEOPLE, PROPERTY, AND THE ENVIRONMENT ARE NOT REDUCED BELOW A LEVEL THAT IS REASONABLY, APPROPRIATE, AND LEGAL, WHETHER IN GENERAL OR IN A SPECIFIC INDUSTRY. BY ACCESSING THE SOFTWARE, YOU FURTHER ACKNOWLEDGE THAT YOUR HIGH-RISK USE OF THE SOFTWARE IS AT YOUR OWN RISK.

docs/azure_app_service_auth_setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
![Web](./images/azure-app-service-auth-setup/Web.png)
5454

5555
8. Enter the `web app URL` (Provide the app service name in place of XXXX) and Save. Then go back to [Step 1](#step-1-add-authentication-in-azure-app-service-configuration) and follow from _Point 4_ choose `Pick an existing app registration in this directory` from the Add an Identity Provider page and provide the newly registered App Name.
56-
E.g. https://appservicename.azurewebsites.net/.auth/login/aad/callback
56+
E.g. <<https://<< appservicename >>.azurewebsites.net/.auth/login/aad/callback>>
5757

5858
![Add Details](./images/azure-app-service-auth-setup/WebAppURL.png)

documentation/CustomizeSolution.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Table of Contents
2+
3+
- [Table of Contents](#table-of-contents)
4+
- [Accelerating your own Multi-Agent - Custom Automation Engine MVP](#accelerating-your-own-multi-agent---custom-automation-engine-mvp)
5+
- [Technical Overview](#technical-overview)
6+
- [Adding a New Agent to the Multi-Agent System](#adding-a-new-agent-to-the-multi-agent-system)
7+
- [API Reference](#api-reference)
8+
- [Models and Datatypes](#models-and-datatypes)
9+
- [Application Flow](#application-flow)
10+
- [Agents Overview](#agents-overview)
11+
- [Persistent Storage with Cosmos DB](#persistent-storage-with-cosmos-db)
12+
- [Utilities](#utilities)
13+
- [Summary](#summary)
14+
15+
116
# Accelerating your own Multi-Agent - Custom Automation Engine MVP
217

318
As the name suggests, this project is designed to accelerate development of Multi-Agent solutions in your environment. The example solution presented shows how such a solution would be implemented and provides example agent definitions along with stubs for possible tools those agents could use to accomplish tasks. You will want to implement real functions in your own environment, to be used by agents customized around your own use cases. Users can choose the LLM that is optimized for responsible use. The default LLM is GPT-4o which inherits the existing responsible AI mechanisms and filters from the LLM provider. We encourage developers to review [OpenAI’s Usage policies](https://openai.com/policies/usage-policies/) and [Azure OpenAI’s Code of Conduct](https://learn.microsoft.com/en-us/legal/cognitive-services/openai/code-of-conduct) when using GPT-4o. This document is designed to provide the in-depth technical information to allow you to add these customizations. Once the agents and tools have been developed, you will likely want to implement your own real world front end solution to replace the example in this accelerator.
@@ -15,21 +30,6 @@ This application is an AI-driven orchestration system that manages a group of AI
1530
This code has not been tested as an end-to-end, reliable production application- it is a foundation to help accelerate building out multi-agent systems. You are encouraged to add your own data and functions to the agents, and then you must apply your own performance and safety evaluation testing frameworks to this system before deploying it.
1631

1732
Below, we'll dive into the details of each component, focusing on the endpoints, data types, and the flow of information through the system.
18-
# Table of Contents
19-
20-
- [Table of Contents](#table-of-contents)
21-
- [Accelerating your own Multi-Agent - Custom Automation Engine MVP](#accelerating-your-own-multi-agent---custom-automation-engine-mvp)
22-
- [Technical Overview](#technical-overview)
23-
- [Adding a New Agent to the Multi-Agent System](#adding-a-new-agent-to-the-multi-agent-system)
24-
- [API Reference](#api-reference)
25-
- [Models and Datatypes](#models-and-datatypes)
26-
- [Application Flow](#application-flow)
27-
- [Agents Overview](#agents-overview)
28-
- [Persistent Storage with Cosmos DB](#persistent-storage-with-cosmos-db)
29-
- [Utilities](#utilities)
30-
- [Summary](#summary)
31-
32-
3333
## Adding a New Agent to the Multi-Agent System
3434

3535
This guide details the steps required to add a new agent to the Multi-Agent Custom Automation Engine. The process includes registering the agent, defining its capabilities through tools, and ensuring the PlannerAgent includes the new agent when generating activity plans.

documentation/DeploymentGuide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ The files for the dev container are located in `/.devcontainer/` folder.
282282

283283
4. **Deploy the Bicep template:**
284284

285-
- You can use the Bicep extension for VSCode (Right-click the `.bicep` file, then select "Show deployment plane") or use the Azure CLI:
285+
- You can use the Bicep extension for VSCode (Right-click the `.bicep` file, then select "Show deployment plan") or use the Azure CLI:
286286
```bash
287287
az deployment group create -g <resource-group-name> -f deploy/macae-dev.bicep --query 'properties.outputs'
288288
```

documentation/azure_app_service_auth_setup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
![Add Provider](./images/azure-app-service-auth-setup/AppAuthIdentityProviderAdd.png)
2020

21-
5. Accept the default values and click on `Add` button to go back to the previous page with the idenity provider added.
21+
5. Accept the default values and click on `Add` button to go back to the previous page with the identity provider added.
2222

2323
![Add Provider](./images/azure-app-service-auth-setup/AppAuthIdentityProviderAdded.png)
2424

@@ -40,7 +40,7 @@
4040

4141
![Add Details](./images/azure-app-service-auth-setup/AddDetails.png)
4242

43-
5. After application is created sucessfully, then click on `Add a Redirect URL`.
43+
5. After application is created successfully, then click on `Add a Redirect URL`.
4444

4545
![Redirect URL](./images/azure-app-service-auth-setup/AddRedirectURL.png)
4646

@@ -53,6 +53,6 @@
5353
![Web](./images/azure-app-service-auth-setup/Web.png)
5454

5555
8. Enter the `web app URL` (Provide the app service name in place of XXXX) and Save. Then go back to [Step 1](#step-1-add-authentication-in-azure-app-service-configuration) and follow from _Point 4_ choose `Pick an existing app registration in this directory` from the Add an Identity Provider page and provide the newly registered App Name.
56-
E.g. https://appservicename.azurewebsites.net/.auth/login/aad/callback
56+
E.g. <<https://<< appservicename >>.azurewebsites.net/.auth/login/aad/callback>>
5757

5858
![Add Details](./images/azure-app-service-auth-setup/WebAppURL.png)

0 commit comments

Comments
 (0)