Skip to content

The Multi-Agent Custom Automation Engine Solution Accelerator is an AI-driven orchestration system that manages a group of AI agents to accomplish tasks based on user input. Powered by AutoGen, Azure OpenAI, Cosmos, and infrastructure services, it provides a ready to go application to use as a reference, allowing you to hit the ground running.

License

Notifications You must be signed in to change notification settings

microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator

Repository files navigation

Multi-Agent-Custom-Automation-Engine – Solution Accelerator

MENU: USER STORY | QUICK DEPLOY | SUPPORTING DOCUMENTATION |


User story

Overview

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.

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. Please see this blog post 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

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


QUICK DEPLOY

Prerequisites

To deploy this solution accelerator, ensure you have access to an Azure subscription with the necessary permissions to create resource groups and resources. Follow the steps in Azure Account Set Up

Check the Azure Products by Region page and select a region where the following services are available:

⚠️ Important: Check Azure OpenAI Quota Availability

➡️ To ensure sufficient quota is available in your subscription, please follow Quota check instructions guide before you deploy the solution.

Open in GitHub Codespaces Open in Dev Containers Deploy to Azure

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:

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

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

To adjust quota settings if required, follow these steps

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.

Quick Deploy

Quick Deploy

You can one-click deploy this solution into your environment by clicking the button below, and filling in the deployment template.

Deploy to Azure

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

  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

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:

  1. Start Docker Desktop (install it if not already installed)

  2. Open the project:

    Open in Dev Containers

  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

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.

Deploying

Once you've opened the project in Codespaces or in Dev Containers or locally, you can deploy it to Azure following the following steps.

To change the azd parameters from the default values, follow the steps here.

  1. Login to Azure:

    azd auth login

    To authenticate with Azure Developer CLI (azd), use the following command with your Tenant ID:

    azd auth login --tenant-id <tenant-id>
  2. Provision and deploy all the resources:

    azd up
  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, 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.

Additional Steps

  1. Add App Authentication

    Follow steps in App Authentication to configure authentication in app service.

    Note: Authentication changes can take up to 10 minutes

  2. Deleting Resources After a Failed Deployment

    Follow steps in Delete Resource Group If your deployment fails and you need to clean up the resources.

Run locally and debug

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.

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.

If you are using VSCode, you can use the debug configuration shown in the local deployment guide.

Sample Questions

To help you get started, here are some Sample Questions you can follow once your application is up and running.


Responsible AI Transparency FAQ

Please refer to Transparency FAQ 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.

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 for the resources:

  • Azure AI Foundry: Free tier. Pricing
  • Azure AI Services: S0 tier, defaults to gpt-4o. Pricing is based on token count. Pricing
  • 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
  • Azure Container Registry: Basic tier. Pricing
  • Azure Cosmos DB: Pricing

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

This template also uses Managed Identity for local development and deployment.

To ensure continued best practices in your own repository, we recommend that anyone creating solutions based on our templates ensure that the Github secret scanning setting is enabled.

You may want to consider additional security measures, such as:

Additional Resources

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.


About

The Multi-Agent Custom Automation Engine Solution Accelerator is an AI-driven orchestration system that manages a group of AI agents to accomplish tasks based on user input. Powered by AutoGen, Azure OpenAI, Cosmos, and infrastructure services, it provides a ready to go application to use as a reference, allowing you to hit the ground running.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published