diff --git a/README.md b/README.md index 435356ecc..a2a99e52f 100644 --- a/README.md +++ b/README.md @@ -1,262 +1,162 @@ -# Multi-Agent-Custom-Automation-Engine – Solution Accelerator +# Multi-Agent Custom Automation Engine Solution Accelerator -MENU: [**USER STORY**](#user-story) \| [**QUICK DEPLOY**](#quick-deploy) \| [**SUPPORTING DOCUMENTATION**](#supporting-documentation) \| +Welcome to the *Multi-Agent Custom Automation Engine* solution accelerator, designed to help businesses leverage AI agents for automating complex organizational tasks. This accelerator provides a foundation for building AI-driven orchestration systems that can coordinate multiple specialized agents to accomplish various business processes. -

-
-User story -

- -### Overview +When dealing with complex organizational tasks, users often face significant challenges, including coordinating across multiple departments, maintaining consistency in processes, and ensuring efficient resource utilization. -Problem: -Agentic AI systems are set to transform the way businesses operate, however it can be fairly complex to build an initial MVP to demonstrate this value. - -Solution: -The Multi-Agent-Custom Automation Engine Solution Accelerator provides a ready to go application to use as the base of the MVP, or as a reference, allowing you to hit the ground running. +The Multi-Agent Custom Automation Engine solution accelerator allows users to specify tasks and have them automatically processed by a group of AI agents, each specialized in different aspects of the business. This automation not only saves time but also ensures accuracy and consistency in task execution. ### Technology Note This accelerator uses the AutoGen framework from Microsoft Research. This is an open source project that is maintained by [Microsoft Research’s AI Frontiers Lab](https://www.microsoft.com/research/lab/ai-frontiers/). Please see this [blog post](https://devblogs.microsoft.com/autogen/microsofts-agentic-frameworks-autogen-and-semantic-kernel/) for the latest information on using the AutoGen framework in production solutions. - -### Use cases / scenarios -The multi-agent approach allows users to utilize multiple AI agents simultaneously for repeatable tasks, ensuring consistency and efficiency. -The agents collaborate with a manager on various assignments for onboarding a new employee, such as HR and tech support AI working together to set up software accounts, configure hardware, schedule onboarding meetings, register employees for benefits, and send welcome emails. Additionally, these agents can handle tasks like procurement and drafting press releases. - -### Business value -Multi-agent systems represent the next wave of Generative AI use cases, offering entirely new opportunities to drive efficiencies in your business. The Multi-Agent-Custom-Automation-Engine Solution Accelerator demonstrates several key benefits: - -- **Allows people to focus on what matters:** by doing the heavy lifting involved with coordinating activities across an organization, peoples’ time is freed up to focus on their specializations. -- **Enabling GenAI to scale:** by not needing to build one application after another, organizations are able to reduce the friction of adopting GenAI across their entire organization. One capability can unlock almost unlimited use cases. -- **Applicable to most industries:** these are common challenges that most organizations face, across most industries. - -Whilst still an emerging area, investing in agentic use cases, digitization and developing tools will be key to ensuring you are able to leverage these new technologies and seize the GenAI moment. - -### Technical key features - -This application is an AI-driven orchestration system that manages a group of AI agents to accomplish tasks based on user input. It uses a FastAPI backend to handle HTTP requests, processes them through various specialized agents, and stores stateful information using Azure Cosmos DB. The system is designed to: - -- Receive input tasks from users. -- Generate a detailed plan to accomplish the task using a Planner agent. -- Execute the plan by delegating steps to specialized agents (e.g., HR, Procurement, Marketing). -- Incorporate human feedback into the workflow. -- Maintain state across sessions with persistent storage. - -This system is intended for developing and deploying custom AI solutions for specific customers. 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. - -\ -![image](./documentation/images/readme/macae-application.png) - - - -### Products used/licenses required - -- Azure Container Application - -- Azure OpenAI - -- Azure Cosmos DB - -- The user deploying the template must have permission to create - resources and resource groups. - -### Solution accelerator architecture -![image](./documentation/images/readme/macae-architecture.png) - - -


-QUICK DEPLOY -

- -### Prerequisites - -To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups and resources**. Follow the steps in [Azure Account Set Up](./docs/AzureAccountSetUp.md) - -Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/table) page and select a **region** where the following services are available: - -- Azure OpenAI Service -- Azure AI Search -- [Azure Semantic Search](./docs/AzureSemanticSearchRegion.md) - -### ⚠️ Important: Check Azure OpenAI Quota Availability - -➡️ To ensure sufficient quota is available in your subscription, please follow **[Quota check instructions guide](./documentation/quota_check.md)** before you deploy the solution. - -| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) | [![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) | -|---|---| +
+ +[**SOLUTION OVERVIEW**](#solution-overview) \| [**QUICK DEPLOY**](#quick-deploy) \| [**BUSINESS SCENARIO**](#business-scenario) \| [**SUPPORTING DOCUMENTATION**](#supporting-documentation) - - -### Configurable Deployment Settings - -When you start the deployment, most parameters will have **default values**, but you can update the below settings by following the steps [here](./documentation/CustomizingAzdParameters.md): - -| **Setting** | **Description** | **Default value** | -|------------|----------------| ------------| -| **Environment Name** | A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | macaetemplate | -| **Cosmos Location** | A **less busy** region for **CosmosDB**, useful in case of availability constraints. | eastus2 | -| **Deployment Type** | Select from a drop-down list. | Global Standard | -| **GPT Model** | Choose from **gpt-4o** | gpt-4o | -| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. | 50k | +
+
+

+Solution overview +

-### [Optional] Quota Recommendations -By default, the **Gpt-4o model capacity** in deployment is set to **50k tokens**, so we recommend -> **For Global Standard | GPT-4o - the capacity to at least 50k tokens for optimal performance.** +The solution leverages Azure OpenAI Service, Azure Container Apps, Azure Cosmos DB, and Azure Container Registry to create an intelligent automation pipeline. It uses a multi-agent approach where specialized AI agents work together to plan, execute, and validate tasks based on user input. -To adjust quota settings if required, follow these [steps](./documentation/AzureGPTQuotaSettings.md) +### Solution architecture +|![image](./documentation/images/readme/macae-architecture.png)| +|---| -### Deployment Options -Pick from the options below to see step-by-step instructions for: GitHub Codespaces, VS Code Dev Containers, Local Environments, and Bicep deployments. +### Application interface +|![image](./documentation/images/readme/macae-application.png)| +|---| -
- Deploy in GitHub Codespaces +### How to customize +If you'd like to customize the solution accelerator, here are some common areas to start: -### GitHub Codespaces +[Custom scenario](./documentation/CustomizeSolution.md) -You can run this solution using GitHub Codespaces. The button will open a web-based VS Code instance in your browser: +
-1. Open the solution accelerator (this may take several minutes): +### Additional resources - [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) -2. Accept the default values on the create Codespaces page -3. Open a terminal window if it is not already open -4. Continue with the [deploying steps](#deploying) +[AutoGen Framework Documentation](https://microsoft.github.io/autogen/dev/user-guide/core-user-guide/index.html) -
+[Azure OpenAI Service Documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/use-your-data) -
- Deploy in VS Code +[Azure Container App documentation](https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-custom-container?tabs=core-tools%2Cacr%2Cazure-cli2%2Cazure-cli&pivots=container-apps) - ### VS Code Dev Containers +
-You can run this solution in 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): +### Key features +
+ Click to learn more about the key features this solution enables -1. Start Docker Desktop (install it if not already installed) -2. Open the project: + - **Allows people to focus on what matters**
+ By doing the heavy lifting involved with coordinating activities across an organization, peoples' time is freed up to focus on their specializations. + + - **Enabling GenAI to scale**
+ By not needing to build one application after another, organizations are able to reduce the friction of adopting GenAI across their entire organization. One capability can unlock almost unlimited use cases. - [![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) + - **Applicable to most industries**
+ These are common challenges that most organizations face, across most industries. -3. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window. -4. Continue with the [deploying steps](#deploying) + - **Efficient task automation**
+ Streamlining the process of analyzing, planning, and executing complex tasks reduces time and effort required to complete organizational processes.
-
- Deploy in your local environment - -### Local environment - -To run the solution site and API backend only locally for development and debugging purposes, See the [local deployment guide](./documentation/LocalDeployment.md). - -
- -### Manual Azure Deployment -Manual Deployment differs from the ‘Quick Deploy’ option in that it will install an Azure Container Registry (ACR) service, and relies on the installer to build and push the necessary containers to this ACR. This allows you to build and push your own code changes and provides a sample solution you can customize based on your requirements. +

+

+Quick deploy +

-See the [local deployment guide](./documentation/ManualAzureDeployment.md). +### How to install or deploy +Follow the quick deploy steps on the deployment guide to deploy this solution to your own Azure subscription. +[Click here to launch the deployment guide](./documentation/DeploymentGuide.md) +

-### Deploying +| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) | [![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) | +|---|---| + +
-Once you've opened the project in [Codespaces](#github-codespaces) or in [Dev Containers](#vs-code-dev-containers) or [locally](#local-environment), you can deploy it to Azure following the following steps. +> ⚠️ **Important: Check Azure OpenAI Quota Availability** +
To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./documentation/quota_check.md) before you deploy the solution. -To change the azd parameters from the default values, follow the steps [here](./documentation/CustomizingAzdParameters.md). +
+### Prerequisites and Costs -1. Login to Azure: +To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups and resources**. Follow the steps in [Azure Account Set Up](./documentation/AzureAccountSetUp.md). - ```shell - azd auth login - ``` +Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/table) page and select a **region** where the following services are available: Azure OpenAI Service, Azure AI Search, and Azure Semantic Search. - #### To authenticate with Azure Developer CLI (`azd`), use the following command with your **Tenant ID**: +Here are some example regions where the services are available: East US, East US2, Japan East, UK South, Sweden Central. - ```sh - azd auth login --tenant-id - ``` +Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage. The majority of the Azure resources used in this infrastructure are on usage-based pricing tiers. However, Azure Container Registry has a fixed cost per registry per day. -2. Provision and deploy all the resources: +Use the [Azure pricing calculator](https://azure.microsoft.com/en-us/pricing/calculator) to calculate the cost of this solution in your subscription. - ```shell - azd up - ``` +| Product | Description | Cost | +|---|---|---| +| [Azure OpenAI Service](https://learn.microsoft.com/azure/ai-services/openai/) | Powers the AI agents for task automation | [Pricing](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) | +| [Azure Container Apps](https://learn.microsoft.com/azure/container-apps/) | Hosts the web application frontend | [Pricing](https://azure.microsoft.com/pricing/details/container-apps/) | +| [Azure Cosmos DB](https://learn.microsoft.com/azure/cosmos-db/) | Stores metadata and processing results | [Pricing](https://azure.microsoft.com/pricing/details/cosmos-db/) | +| [Azure Container Registry](https://learn.microsoft.com/azure/container-registry/) | Stores container images for deployment | [Pricing](https://azure.microsoft.com/pricing/details/container-registry/) | -3. Provide an `azd` environment name (like "macaeapp") -4. Select a subscription from your Azure account, and select a location which has quota for all the resources. - * This deployment will take *7-10 minutes* to provision the resources in your account and set up the solution with sample data. - * If you get an error or timeout with deployment, changing the location can help, as there may be availability constraints for the resources. -5. Open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service and get the app URL from `Default domain`. +
-6. You can now delete the resources by running `azd down`, if you are done trying out the application. - +>⚠️ **Important:** To avoid unnecessary costs, remember to take down your app if it's no longer in use, +either by deleting the resource group in the Portal or running `azd down`. -

-Additional Steps +

+

+Business Scenario

-1. **Add App Authentication** - - Follow steps in [App Authentication](./documentation/azure_app_service_auth_setup.md) to configure authenitcation in app service. +|![image](./documentation/images/readme/macae-application.png)| +|---| - Note: Authentication changes can take up to 10 minutes +
-2. **Deleting Resources After a Failed Deployment** +Companies maintaining and modernizing their business processes often face challenges in coordinating complex tasks across multiple departments. They may have various processes that need to be automated and coordinated efficiently. Some of the challenges they face include: - Follow steps in [Delete Resource Group](./documentation/DeleteResourceGroup.md) If your deployment fails and you need to clean up the resources. +- Difficulty coordinating activities across different departments +- Time-consuming process to manually manage complex workflows +- High risk of errors from manual coordination, which can lead to process inefficiencies +- Lack of available resources to handle increasing automation demands -### Run locally and debug +By using the *Multi-Agent Custom Automation Engine* solution accelerator, users can automate these processes, ensuring that all tasks are accurately coordinated and executed efficiently. -To debug the solution, you can use the Cosmos and OpenAI services you have manually deployed. To do this, you need to ensure that your Azure identity has the required permissions on the Cosmos and OpenAI services. +### Business value +
+ Click to learn more about what value this solution provides -- For OpenAI service, you can add yourself to the ‘Cognitive Services OpenAI User’ permission in the Access Control (IAM) pane of the Azure portal. -- Cosmos is a little more difficult as it requires permissions be added through script. See these examples for more information: - - [Use data plane role-based access control - Azure Cosmos DB for NoSQL | Microsoft Learn](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/security/how-to-grant-data-plane-role-based-access?tabs=built-in-definition%2Cpython&pivots=azure-interface-cli) - - [az cosmosdb sql role assignment | Microsoft Learn](https://learn.microsoft.com/en-us/cli/azure/cosmosdb/sql/role/assignment?view=azure-cli-latest#az-cosmosdb-sql-role-assignment-create) + - **Process Efficiency**
+ Automate the coordination of complex tasks, significantly reducing processing time and effort. -Add the appropriate endpoints from Cosmos and OpenAI services to your .env file. -Note that you can configure the name of the Cosmos database in the configuration. This can be helpful if you wish to separate the data messages generated in local debugging from those associated with the cloud based solution. If you choose to use a different database, you will need to create that database in the Cosmos instance as this is not done automatically. + - **Error Reduction**
+ Multi-agent validation ensures accurate task execution and maintains process integrity. -If you are using VSCode, you can use the debug configuration shown in the [local deployment guide](./documentation/LocalDeployment.md). + - **Resource Optimization**
+ Better utilization of human resources by focusing on specialized tasks. -## Sample Questions + - **Cost Efficiency**
+ Reduces manual coordination efforts and improves overall process efficiency. -To help you get started, here are some [Sample Questions](./documentation/SampleQuestions.md) you can follow once your application is up and running. + - **Scalability**
+ Enables organizations to handle increasing automation demands without proportional resource increases. -

-
-Responsible AI Transparency FAQ -

+
-Please refer to [Transparency FAQ](./documentation/TRANSPARENCY_FAQ.md) for responsible AI transparency details of this solution accelerator. +

-

+

Supporting documentation

-### How to customize - -This solution is designed to be easily customizable. You can modify the front end site, or even build your own front end and attach to the backend API. You can further customize the backend by adding your own agents with their own specific capabilities. Deeper technical information to aid in this customization can be found in this [document](./documentation/CustomizeSolution.md). - -### Costs - -Pricing varies per region and usage, so it isn't possible to predict exact costs for your usage. -The majority of the Azure resources used in this infrastructure are on usage-based pricing tiers. -However, Azure Container Registry has a fixed cost per registry per day. - -You can try the [Azure pricing calculator](https://azure.microsoft.com/en-us/pricing/calculator) for the resources: - -* Azure AI Foundry: Free tier. [Pricing](https://azure.microsoft.com/pricing/details/ai-studio/) -* Azure AI Services: S0 tier, defaults to gpt-4o. 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/) -* Azure Container Registry: Basic tier. [Pricing](https://azure.microsoft.com/pricing/details/container-registry/) -* Azure Cosmos DB: [Pricing](https://azure.microsoft.com/en-us/pricing/details/cosmos-db/autoscale-provisioned/) - - -⚠️ To avoid unnecessary costs, remember to take down your app if it's no longer in use, -either by deleting the resource group in the Portal or running `azd down`. - ### Security guidelines This template uses Azure Key Vault to store all connections to communicate between resources. @@ -267,30 +167,41 @@ To ensure continued best practices in your own repository, we recommend that any You may want to consider additional security measures, such as: -* Enabling Microsoft Defender for Cloud to [secure your Azure resources](https://learn.microsoft.com/azure/security-center/defender-for-cloud). +* Enabling Microsoft Defender for Cloud to [secure your Azure resources](https://learn.microsoft.com/en-us/azure/defender-for-cloud/). * Protecting the Azure Container Apps instance with a [firewall](https://learn.microsoft.com/azure/container-apps/waf-app-gateway) and/or [Virtual Network](https://learn.microsoft.com/azure/container-apps/networking?tabs=workload-profiles-env%2Cazure-cli). +
-### Additional Resources -- [Python FastAPI documentation](https://fastapi.tiangolo.com/learn/) -- [AutoGen Framework Documentation](https://microsoft.github.io/autogen/dev/user-guide/core-user-guide/index.html) -- [Azure Container App documentation](https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-custom-container?tabs=core-tools%2Cacr%2Cazure-cli2%2Cazure-cli&pivots=container-apps) -- [Azure OpenAI Service - Documentation, quickstarts, API reference - Azure AI services | Microsoft Learn](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/use-your-data) -- [Azure Cosmos DB documentation](https://learn.microsoft.com/en-us/azure/cosmos-db/) +### Cross references +Check out similar solution accelerators +| Solution Accelerator | Description | +|---|---| +| [Document Knowledge Mining](https://github.com/microsoft/Document-Knowledge-Mining-Solution-Accelerator) | Extract structured information from unstructured documents using AI | +| [Modernize your Code](https://github.com/microsoft/Modernize-your-Code-Solution-Accelerator) | Automate the translation of SQL queries between different dialects | +| [Conversation Knowledge Mining](https://github.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator) | Enable organizations to derive insights from volumes of conversational data using generative AI | -## Disclaimers +
-To the extent that the Software includes components or code used in or derived from Microsoft products or services, including without limitation Microsoft Azure Services (collectively, “Microsoft Products and Services”), you must also comply with the Product Terms applicable to such Microsoft Products and Services. You acknowledge and agree that the license governing the Software does not grant you a license or other right to use Microsoft Products and Services. Nothing in the license or this ReadMe file will serve to supersede, amend, terminate or modify any terms in the Product Terms for any Microsoft Products and Services. +## Provide feedback -You must also comply with all domestic and international export laws and regulations that apply to the Software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit https://aka.ms/exporting. +Have questions, find a bug, or want to request a feature? [Submit a new issue](https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator/issues) on this repo and we'll connect. -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. +
-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. +## Responsible AI Transparency FAQ +Please refer to [Transparency FAQ](./documentation/TRANSPARENCY_FAQ.md) for responsible AI transparency details of this solution accelerator. + +
-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. +## Disclaimers + +To the extent that the Software includes components or code used in or derived from Microsoft products or services, including without limitation Microsoft Azure Services (collectively, "Microsoft Products and Services"), you must also comply with the Product Terms applicable to such Microsoft Products and Services. You acknowledge and agree that the license governing the Software does not grant you a license or other right to use Microsoft Products and Services. Nothing in the license or this ReadMe file will serve to supersede, amend, terminate or modify any terms in the Product Terms for any Microsoft Products and Services. ---- +You must also comply with all domestic and international export laws and regulations that apply to the Software, which include restrictions on destinations, end users, and end use. For further information on export restrictions, visit https://aka.ms/exporting. +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. + +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. +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. \ No newline at end of file diff --git a/azure.yaml b/azure.yaml index ee1b5104d..42af78d29 100644 --- a/azure.yaml +++ b/azure.yaml @@ -1,3 +1,2 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json -name: multi-agent-custom-automation-engine-solution-accelerator - +name: multi-agent-custom-automation-engine-solution-accelerator \ No newline at end of file diff --git a/documentation/AzureAccountSetUp.md b/documentation/AzureAccountSetUp.md new file mode 100644 index 000000000..22ffa836f --- /dev/null +++ b/documentation/AzureAccountSetUp.md @@ -0,0 +1,14 @@ +## Azure account setup + +1. Sign up for a [free Azure account](https://azure.microsoft.com/free/) and create an Azure Subscription. +2. Check that you have the necessary permissions: + * Your Azure account must have `Microsoft.Authorization/roleAssignments/write` permissions, such as [Role Based Access Control Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview), [User Access Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#user-access-administrator), or [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner). + * Your Azure account also needs `Microsoft.Resources/deployments/write` permissions on the subscription level. + +You can view the permissions for your account and subscription by following the steps below: +- Navigate to the [Azure Portal](https://portal.azure.com/) and click on `Subscriptions` under 'Navigation' +- Select the subscription you are using for this accelerator from the list. + - If you try to search for your subscription and it does not come up, make sure no filters are selected. +- Select `Access control (IAM)` and you can see the roles that are assigned to your account for this subscription. + - If you want to see more information about the roles, you can go to the `Role assignments` + tab and search by your account name and then click the role you want to view more information about. \ No newline at end of file diff --git a/documentation/DeploymentGuide.md b/documentation/DeploymentGuide.md new file mode 100644 index 000000000..acb45d8a3 --- /dev/null +++ b/documentation/DeploymentGuide.md @@ -0,0 +1,345 @@ +# Deployment Guide + +## **Pre-requisites** + +To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups, resources, app registrations, and assign roles at the resource group level**. This should include Contributor role at the subscription level and Role Based Access Control role on the subscription and/or resource group level. Follow the steps in [Azure Account Set Up](../documentation/AzureAccountSetUp.md). + +Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=all®ions=all) page and select a **region** where the following services are available: + +- [Azure OpenAI Service](https://learn.microsoft.com/en-us/azure/ai-services/openai/) +- [Azure Container Apps](https://learn.microsoft.com/en-us/azure/container-apps/) +- [Azure Container Registry](https://learn.microsoft.com/en-us/azure/container-registry/) +- [Azure Cosmos DB](https://learn.microsoft.com/en-us/azure/cosmos-db/) +- [Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/) +- [Azure AI Search](https://learn.microsoft.com/en-us/azure/search/) +- [GPT Model Capacity](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models) + +Here are some example regions where the services are available: East US, East US2, Japan East, UK South, Sweden Central. + +### **Important Note for PowerShell Users** + +If you encounter issues running PowerShell scripts due to the policy of not being digitally signed, you can temporarily adjust the `ExecutionPolicy` by running the following command in an elevated PowerShell session: + +```powershell +Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass +``` + +This will allow the scripts to run for the current session without permanently changing your system's policy. + +## Deployment Options & Steps + +Pick from the options below to see step-by-step instructions for GitHub Codespaces, VS Code Dev Containers, Local Environments, and Bicep deployments. + +| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) | [![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) | +|---|---| + +
+ Deploy in GitHub Codespaces + +### GitHub Codespaces + +You can run this solution using GitHub Codespaces. The button will open a web-based VS Code instance in your browser: + +1. Open the solution accelerator (this may take several minutes): + + [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) + +2. Accept the default values on the create Codespaces page. +3. Open a terminal window if it is not already open. +4. Continue with the [deploying steps](#deploying-with-azd). + +
+ +
+ Deploy in VS Code + +### VS Code Dev Containers + +You can run this solution in 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). +2. 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) + +3. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window. +4. Continue with the [deploying steps](#deploying-with-azd). + +
+ +
+ Deploy in your local Environment + +### Local Environment + +If you're not using one of the above options for opening the project, then you'll need to: + +1. Make sure the following tools are installed: + - [PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.5) (v7.0+) - available for Windows, macOS, and Linux. + - [Azure Developer CLI (azd)](https://aka.ms/install-azd) + - [Python 3.9+](https://www.python.org/downloads/) + - [Docker Desktop](https://www.docker.com/products/docker-desktop/) + - [Git](https://git-scm.com/downloads) + +2. Clone the repository or download the project code via command-line: + + ```shell + azd init -t microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator/ + ``` + +3. Open the project folder in your terminal or editor. +4. Continue with the [deploying steps](#deploying-with-azd). + +
+ +
+ +Consider the following settings during your deployment to modify specific settings: + +
+ Configurable Deployment Settings + +When you start the deployment, most parameters will have **default values**, but you can update the following settings: + +| **Setting** | **Description** | **Default value** | +|-------------|-----------------|-------------------| +| **Azure Region** | The region where resources will be created. | East US | +| **Secondary Location** | A **less busy** region for **Azure Cosmos DB**, useful in case of availability constraints. | eastus2 | +| **Deployment Type** | Select from a drop-down list. | GlobalStandard | +| **GPT Model** | Choose from **gpt-4, gpt-4o, gpt-4o-mini**. | gpt-4o | +| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. | 100k | + +
+ +
+ [Optional] Quota Recommendations + +By default, the **GPT model capacity** in deployment is set to **30k tokens**. +> **We recommend increasing the capacity to 100k tokens for optimal performance.** + +To adjust quota settings, follow these [steps](./AzureGPTQuotaSettings.md). + +**⚠️ Warning:** Insufficient quota can cause deployment errors. Please ensure you have the recommended capacity or request additional capacity before deploying this solution. + +
+ +### Deploying with AZD + +Once you've opened the project in [Codespaces](#github-codespaces), [Dev Containers](#vs-code-dev-containers), or [locally](#local-environment), you can deploy it to Azure by following these steps: + +1. Login to Azure: + + ```shell + azd auth login + ``` + + #### To authenticate with Azure Developer CLI (`azd`), use the following command with your **Tenant ID**: + + ```sh + azd auth login --tenant-id + ``` + +2. Provision and deploy all the resources: + + ```shell + azd up + ``` + +3. Provide an `azd` environment name (e.g., "macaeapp"). +4. Select a subscription from your Azure account and choose a location that has quota for all the resources. + - This deployment will take *4-6 minutes* to provision the resources in your account and set up the solution with sample data. + - If you encounter an error or timeout during deployment, changing the location may help, as there could be availability constraints for the resources. + +5. Once the deployment has completed successfully, open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service, and get the app URL from `Default domain`. + +6. If you are done trying out the application, you can delete the resources by running `azd down`. + +### Publishing Local Build Container to Azure Container Registry + +If you need to rebuild the source code and push the updated container to the deployed Azure Container Registry, follow these steps: + +1. Set the environment variable `USE_LOCAL_BUILD` to `True`: + + - **Linux/macOS**: + ```bash + export USE_LOCAL_BUILD=True + ``` + + - **Windows (PowerShell)**: + ```powershell + $env:USE_LOCAL_BUILD = $true + ``` +2. Run the `az login` command + ```bash + az login + ``` + +3. Run the `azd up` command again to rebuild and push the updated container: + ```bash + azd up + ``` + +This will rebuild the source code, package it into a container, and push it to the Azure Container Registry associated with your deployment. + +This guide provides step-by-step instructions for deploying your application using Azure Container Registry (ACR) and Azure Container Apps. + +There are several ways to deploy the solution. You can deploy to run in Azure in one click, or manually, or you can deploy locally. + +When Deployment is complete, follow steps in [Set Up Authentication in Azure App Service](../documentation/azure_app_service_auth_setup.md) to add app authentication to your web app running on Azure App Service + +# 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)). + +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 + ``` + +3. **Create a Resource Group:** + + - You can create it either through the Azure Portal or the Azure CLI: + ```bash + az group create --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 -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 --account-name --role-definition-name "Cosmos DB Built-in Data Contributor" --principal-id --scope /subscriptions//resourceGroups//providers/Microsoft.DocumentDB/databaseAccounts/ + ``` + + ```bash + az role assignment create --assignee --role "Cognitive Services OpenAI User" --scope /subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts/ + ``` + **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 + } +``` + diff --git a/documentation/LocalDeployment.md b/documentation/LocalDeployment.md deleted file mode 100644 index a34ba5837..000000000 --- a/documentation/LocalDeployment.md +++ /dev/null @@ -1,164 +0,0 @@ -# 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 - ``` - -3. **Create a Resource Group:** - - - You can create it either through the Azure Portal or the Azure CLI: - ```bash - az group create --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 -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 --account-name --role-definition-name "Cosmos DB Built-in Data Contributor" --principal-id --scope /subscriptions//resourceGroups//providers/Microsoft.DocumentDB/databaseAccounts/ - ``` - - ```bash - az role assignment create --assignee --role "Cognitive Services OpenAI User" --scope /subscriptions//resourceGroups//providers/Microsoft.CognitiveServices/accounts/ - ``` - **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 - } -``` - diff --git a/documentation/images/readme/business-scenario.png b/documentation/images/readme/business-scenario.png new file mode 100644 index 000000000..017032cce Binary files /dev/null and b/documentation/images/readme/business-scenario.png differ diff --git a/documentation/images/readme/macae-architecture.png b/documentation/images/readme/macae-architecture.png index 259c5eac1..95826744e 100644 Binary files a/documentation/images/readme/macae-architecture.png and b/documentation/images/readme/macae-architecture.png differ diff --git a/documentation/images/readme/quick-deploy.png b/documentation/images/readme/quick-deploy.png new file mode 100644 index 000000000..421c0c1fa Binary files /dev/null and b/documentation/images/readme/quick-deploy.png differ diff --git a/documentation/images/readme/solution-overview.png b/documentation/images/readme/solution-overview.png new file mode 100644 index 000000000..483dbfcd2 Binary files /dev/null and b/documentation/images/readme/solution-overview.png differ diff --git a/documentation/images/readme/supporting-documentation.png b/documentation/images/readme/supporting-documentation.png new file mode 100644 index 000000000..b498805cd Binary files /dev/null and b/documentation/images/readme/supporting-documentation.png differ diff --git a/infra/main.bicep b/infra/main.bicep index da8dbfb52..840b9a785 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -1,5 +1,6 @@ +targetScope = 'resourceGroup' @description('Location for all resources.') -param location string +param location string = 'EastUS2' //Fixed for model availability, change back to resourceGroup().location @allowed([ 'australiaeast' @@ -27,12 +28,12 @@ param location string 'westus3' ]) @description('Location for all Ai services resources. This location can be different from the resource group location.') -param azureOpenAILocation string // The location used for all deployed resources. This location must be in the same region as the resource group. +param azureOpenAILocation string = 'eastus2' // The location used for all deployed resources. This location must be in the same region as the resource group. @minLength(3) @maxLength(20) @description('Prefix for all resources created by this template. This prefix will be used to create unique names for all resources. The prefix must be unique within the resource group.') -param prefix string +param prefix string = take('macaeo-${uniqueString(resourceGroup().id)}', 10) @description('Tags to apply to all deployed resources') param tags object = {} diff --git a/next-steps.md b/next-steps.md index 3203dfccc..b68d0f3f1 100644 --- a/next-steps.md +++ b/next-steps.md @@ -17,7 +17,8 @@ To troubleshoot any issues, see [troubleshooting](#troubleshooting). ### Configure environment variables for running services -Configure environment variables for running services by updating `settings` in [main.parameters.json](./infra/main.parameters.json). +Environment variables can be configured by modifying the `env` settings in [resources.bicep](./infra/resources.bicep). +To define a secret, add the variable as a `secretRef` pointing to a `secrets` entry or a stored KeyVault secret. ### Configure CI/CD pipeline