Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4c29f43
Consistent Deployment Name updated
AjitPadhi-Microsoft Apr 24, 2025
a8ec0f3
merging deploys and docs
marktayl1 Apr 28, 2025
d2df9d3
env changes for endpoint and auth
marktayl1 Apr 28, 2025
b0702e3
fix for auth enabled
marktayl1 Apr 28, 2025
2810359
fixed table format
gpickett Apr 29, 2025
f11e70a
removed old readMe
gpickett Apr 29, 2025
a762365
Merge pull request #112 from microsoft/PSL-US-16594
Roopan-Microsoft Apr 29, 2025
82fff2d
Update main.bicep
Roopan-Microsoft Apr 29, 2025
2b66e69
Merge pull request #128 from microsoft/azd-to-main
marktayl1 Apr 29, 2025
527f80a
change p to b sku
marktayl1 Apr 29, 2025
46633da
Merge pull request #133 from microsoft/p-to-b-sku
gpickett Apr 29, 2025
d8307e8
validation
gpickett Apr 29, 2025
872720d
Merge pull request #137 from microsoft/azdValidation
marktayl1 Apr 29, 2025
d38856c
fixing validation pipeline
gpickett Apr 30, 2025
ede7ad2
Merge pull request #142 from microsoft/azdPipelinefix
marktayl1 Apr 30, 2025
41d095e
Update main.bicep
gpickett Apr 30, 2025
78eef2f
Update azure-dev.yml
gpickett Apr 30, 2025
e9ba19c
Update main.bicep
gpickett Apr 30, 2025
774ea0b
azd fix
gpickett Apr 30, 2025
3efe3f2
another try
gpickett Apr 30, 2025
6670e83
Update azure-dev.yml
gpickett Apr 30, 2025
940ecfb
last try
gpickett Apr 30, 2025
66dd549
Merge branch 'gpickett-patch-6' of https://github.com/microsoft/Multi…
gpickett Apr 30, 2025
d694a3f
another
gpickett Apr 30, 2025
19ab469
back to this
gpickett Apr 30, 2025
1f7d9bd
reverting back to this ?
gpickett Apr 30, 2025
a39d0b0
removed
gpickett Apr 30, 2025
cc2e9e3
addded back autogen
gpickett Apr 30, 2025
ff95ea3
There was a typo error in Add a Authentication step. Updated README.md
Kamini-Microsoft Apr 30, 2025
674f466
Merge pull request #143 from microsoft/gpickett-patch-6
gpickett Apr 30, 2025
e5e048b
Merge pull request #144 from microsoft/github-kq-16748
Roopan-Microsoft Apr 30, 2025
ed7abbc
update arch
gpickett Apr 30, 2025
1ac8689
Merge pull request #148 from microsoft/updatedArch
gpickett Apr 30, 2025
1a6b502
updated arch again
gpickett Apr 30, 2025
a24938f
Merge pull request #150 from microsoft/updatedArch
gpickett Apr 30, 2025
661ab2d
main merge back azd semantic kernel project
Fr4nc3 May 1, 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
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ jobs:
id: generate_rg_name
run: |
echo "Generating a unique resource group name..."
TIMESTAMP=$(date +%Y%m%d%H%M%S)
COMMON_PART="ci-biab"
UNIQUE_RG_NAME="${COMMON_PART}${TIMESTAMP}"
ACCL_NAME="ci-biab" # Account name as specified
SHORT_UUID=$(uuidgen | cut -d'-' -f1)
UNIQUE_RG_NAME="arg-${ACCL_NAME}-${SHORT_UUID}"
echo "RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" >> $GITHUB_ENV
echo "Generated Resource_GROUP_PREFIX: ${UNIQUE_RG_NAME}"
Expand Down
618 changes: 618 additions & 0 deletions docs/CustomizeSolution.md

Large diffs are not rendered by default.

164 changes: 164 additions & 0 deletions docs/LocalDeployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# Guide to local development

## Requirements:

- Python 3.10 or higher + PIP
- Azure CLI, and an Azure Subscription
- Visual Studio Code IDE

# Local setup

> **Note for macOS Developers**: If you are using macOS on Apple Silicon (ARM64) the DevContainer will **not** work. This is due to a limitation with the Azure Functions Core Tools (see [here](https://github.com/Azure/azure-functions-core-tools/issues/3112)). We recommend using the [Non DevContainer Setup](./NON_DEVCONTAINER_SETUP.md) instructions to run the accelerator locally.
The easiest way to run this accelerator is in a VS Code Dev Containers, which will open the project in your local VS Code using the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers):

1. Start Docker Desktop (install it if not already installed)
1. Open the project:
[![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator)

1. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window

## Detailed Development Container setup instructions

The solution contains a [development container](https://code.visualstudio.com/docs/remote/containers) with all the required tooling to develop and deploy the accelerator. To deploy the Chat With Your Data accelerator using the provided development container you will also need:

* [Visual Studio Code](https://code.visualstudio.com)
* [Remote containers extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)

If you are running this on Windows, we recommend you clone this repository in [WSL](https://code.visualstudio.com/docs/remote/wsl)

```cmd
git clone https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator
```

Open the cloned repository in Visual Studio Code and connect to the development container.

```cmd
code .
```

!!! tip
Visual Studio Code should recognize the available development container and ask you to open the folder using it. For additional details on connecting to remote containers, please see the [Open an existing folder in a container](https://code.visualstudio.com/docs/remote/containers#_quick-start-open-an-existing-folder-in-a-container) quickstart.

When you start the development container for the first time, the container will be built. This usually takes a few minutes. **Please use the development container for all further steps.**

The files for the dev container are located in `/.devcontainer/` folder.

## Local deployment and debugging:

1. **Clone the repository.**

2. **Log into the Azure CLI:**

- Check your login status using:
```bash
az account show
```
- If not logged in, use:
```bash
az login
```
- To specify a tenant, use:
```bash
az login --tenant <tenant_id>
```

3. **Create a Resource Group:**

- You can create it either through the Azure Portal or the Azure CLI:
```bash
az group create --name <resource-group-name> --location EastUS2
```

4. **Deploy the Bicep template:**

- You can use the Bicep extension for VSCode (Right-click the `.bicep` file, then select "Show deployment plane") or use the Azure CLI:
```bash
az deployment group create -g <resource-group-name> -f deploy/macae-dev.bicep --query 'properties.outputs'
```
- **Note**: You will be prompted for a `principalId`, which is the ObjectID of your user in Entra ID. To find it, use the Azure Portal or run:
```bash
az ad signed-in-user show --query id -o tsv
```
You will also be prompted for locations for Cosmos and OpenAI services. This is to allow separate regions where there may be service quota restrictions.
- **Additional Notes**:
**Role Assignments in Bicep Deployment:**
The **macae-dev.bicep** deployment includes the assignment of the appropriate roles to AOAI and Cosmos services. If you want to modify an existing implementation—for example, to use resources deployed as part of the simple deployment for local debugging—you will need to add your own credentials to access the Cosmos and AOAI services. You can add these permissions using the following commands:
```bash
az cosmosdb sql role assignment create --resource-group <solution-accelerator-rg> --account-name <cosmos-db-account-name> --role-definition-name "Cosmos DB Built-in Data Contributor" --principal-id <aad-user-object-id> --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.DocumentDB/databaseAccounts/<cosmos-db-account-name>
```
```bash
az role assignment create --assignee <aad-user-upn> --role "Cognitive Services OpenAI User" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.CognitiveServices/accounts/<azure-openai-account-name>
```
**Using a Different Database in Cosmos:**
You can set the solution up to use a different database in Cosmos. For example, you can name it something like autogen-dev. To do this:
1. Change the environment variable **COSMOSDB_DATABASE** to the new database name.
2. You will need to create the database in the Cosmos DB account. You can do this from the Data Explorer pane in the portal, click on the drop down labeled “_+ New Container_” and provide all the necessary details.
6. **Create a `.env` file:**
- Navigate to the `src` folder and create a `.env` file based on the provided `.env.sample` file.
7. **Fill in the `.env` file:**
- Use the output from the deployment or check the Azure Portal under "Deployments" in the resource group.
8. **(Optional) Set up a virtual environment:**
- If you are using `venv`, create and activate your virtual environment for both the frontend and backend folders.
9. **Install requirements - frontend:**
- In each of the frontend and backend folders -
Open a terminal in the `src` folder and run:
```bash
pip install -r requirements.txt
```
10. **Run the application:**
- From the src/backend directory:
```bash
python app.py
```
- In a new terminal from the src/frontend directory
```bash
python frontend_server.py
```
10. Open a browser and navigate to `http://localhost:3000`
11. To see swagger API documentation, you can navigate to `http://localhost:8000/docs`
## Debugging the solution locally
You can debug the API backend running locally with VSCode using the following launch.json entry:
```
{
"name": "Python Debugger: Backend",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/src/backend",
"module": "uvicorn",
"args": ["app:app", "--reload"],
"jinja": true
}
```
To debug the python server in the frontend directory (frontend_server.py) and related, add the following launch.json entry:
```
{
"name": "Python Debugger: Frontend",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/src/frontend",
"module": "uvicorn",
"args": ["frontend_server:app", "--port", "3000", "--reload"],
"jinja": true
}
```
58 changes: 58 additions & 0 deletions docs/azure_app_service_auth_setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Set Up Authentication in Azure App Service

## Step 1: Add Authentication in Azure App Service configuration

1. Click on `Authentication` from left menu.

![Authentication](./images/azure-app-service-auth-setup/AppAuthentication.png)

2. Click on `+ Add Provider` to see a list of identity providers.

![Authentication Identity](./images/azure-app-service-auth-setup/AppAuthenticationIdentity.png)

3. Click on `+ Add Provider` to see a list of identity providers.

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

4. Select the first option `Microsoft Entra Id` from the drop-down list. If `Create new app registration` is disabled, go to [Step 1a](#step-1a-creating-a-new-app-registration).

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

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

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

### Step 1a: Creating a new App Registration

1. Click on `Home` and select `Microsoft Entra ID`.

![Microsoft Entra ID](./images/azure-app-service-auth-setup/MicrosoftEntraID.png)

2. Click on `App registrations`.

![App registrations](./images/azure-app-service-auth-setup/Appregistrations.png)

3. Click on `+ New registration`.

![New Registrations](./images/azure-app-service-auth-setup/NewRegistration.png)

4. Provide the `Name`, select supported account types as `Accounts in this organizational directory only(Contoso only - Single tenant)`, select platform as `Web`, enter/select the `URL` and register.

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

5. After application is created sucessfully, then click on `Add a Redirect URL`.

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

6. Click on `+ Add a platform`.

![+ Add platform](./images/azure-app-service-auth-setup/AddPlatform.png)

7. Click on `Web`.

![Web](./images/azure-app-service-auth-setup/Web.png)

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.
E.g. https://appservicename.azurewebsites.net/.auth/login/aad/callback

![Add Details](./images/azure-app-service-auth-setup/WebAppURL.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/azure-app-service-auth-setup/Web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/images/customize_solution/logic_flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/customize_solution/redoc_ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/readme/customerTruth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/readme/macae-application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/readme/macae-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/readme/oneClickDeploy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/readme/userStory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/backend/.env.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
COSMOSDB_ENDPOINT=https://biberty-cosmos-vpvzruptcepiu.documents.azure.com:443/
COSMOSDB_DATABASE=autogen
COSMOSDB_CONTAINER=memory

AZURE_OPENAI_ENDPOINT=https://biberty-aiservices.openai.azure.com/
AZURE_OPENAI_MODEL_NAME=gpt-4o
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o
AZURE_OPENAI_API_VERSION=2025-01-01-preview

APPLICATIONINSIGHTS_INSTRUMENTATION_KEY=b57d47e6-1007-48bb-8c9b-71ecea7e3a12
AZURE_AI_SUBSCRIPTION_ID=ff9b5430-90ea-44c0-8a00-e488c1bf56f4
AZURE_AI_RESOURCE_GROUP=rg-biberty
AZURE_AI_PROJECT_NAME=biberty-aiproject
AZURE_AI_AGENT_PROJECT_CONNECTION_STRING="swedencentral.api.azureml.ms;ff9b5430-90ea-44c0-8a00-e488c1bf56f4;rg-biberty;biberty-aiproject"
AZURE_AI_MODEL_DEPLOYMENT_NAME=gpt-4o
APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=b57d47e6-1007-48bb-8c9b-71ecea7e3a12;IngestionEndpoint=https://swedencentral-0.in.applicationinsights.azure.com/;LiveEndpoint=https://swedencentral.livediagnostics.monitor.azure.com/;ApplicationId=7ca9c5a9-047e-4ba4-b2aa-6038b5f2d5f3"

BACKEND_API_URL='http://localhost:8000'
FRONTEND_SITE_NAME='http://127.0.0.1:3000'
Loading