Skip to content

abhirockzz/banking-multi-agent-workshop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

224 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

banking-multi-agent-workshop

A multi-agent sample and workshop for a retail banking scenario. Implemented in both C# using Semantic Kernel Agents and Python using LangGraph.

Build a Multi-Agent AI application using Semantic Kernel Agents or LangGraph

Csharp project - Open in GitHub Codespaces

Python project - Open in GitHub Codespaces

Open in Dev Containers

This sample application and full-day workshop shows how to build a multi-tenant, multi-agent, banking application with containerized applications built in two different versions

  • Using Semantic Kernel Agents in C# or
  • LangGraph written in Python

Both are hosted on Azure Container Apps, with Azure Cosmos DB for NoSQL as the transactional database and vector store and Azure OpenAI Service for embeddings and completions. This is sample and full-day workshop provides practical guidance on many concepts you will need to design and build these types of applications.

Important Security Notice

This template, the application code and configuration it contains, has been built to showcase Microsoft Azure specific services and tools. We strongly advise our customers not to make this code part of their production environments without implementing or enabling additional security features.

Workshop Learning Exercises

This application demonstrates the following concepts and how to implement them:

View the Exercises for the LangGraph Python Workshop View the Exercises for the Semantic Kernel Csharp Workshop

Architecture Diagram

Architecture Diagram

User Experience

Multi-Agent user interface

Getting Started

Prerequisites

  • Azure subscription.

  • Subscription access to Azure OpenAI service. Start here to Request Access to Azure OpenAI Service. If you have access, see below for ensuring enough quota to deploy.

    Checking Azure OpenAI quota limits

    For this sample to deploy successfully, there needs to be enough Azure OpenAI quota for the models used by this sample within your subscription. This sample deploys a new Azure OpenAI account with two models, gpt-4o with 10K tokens per minute and text-3-large with 5k tokens per minute. For more information on how to check your model quota and change it, see Manage Azure OpenAI Service Quota

    Azure Subscription Permission Requirements

    This solution deploys a user-assigned managed identity and defines then applies Azure Cosmos DB and Azure OpenAI RBAC permissions to this as well as your own Service Principal Id. You will need the following Azure RBAC roles assigned to your identity in your Azure subscription or Subscription Owner access which will give you both of the following.

GitHub Codespaces

You can run this sample app and workshop virtually by using GitHub Codespaces. The button will open a web-based VS Code instance in your browser:

  1. Open the template (this may take several minutes):

Open in GitHub Codespaces

  1. Open a terminal window and navigate to the csharp or python folder.

  2. Continue with the Deployment below

Local Environment

  1. If you're CodeSpaces for opening the project, install the following prerequisites
  1. Download the project code:
azd init -t AzureCosmosDB/banking-multi-agent-workshop

Deployment

  1. From the terminal, naviate to the csharp or python folder.

  2. Navigate to the /infra folder.

  3. Log in to AZD.

    azd auth login
  4. Provision the Azure services, build your local solution container, and deploy the application.

    azd up

Setting up local debugging

When you deploy this solution it automatically injects endpoints and configuration values into the secrets.json file used by .NET applications.

To modify values for the Quickstarts, locate the value of UserSecretsId in the csproj file in the /src folder of this sample and save the value.

<PropertyGroup>
  <UserSecretsId>your-guid-here</UserSecretsId>
</PropertyGroup>

Locate the secrets.json file and open with a text editor.

  • Windows: C:\Users\<YourUserName>\AppData\Roaming\Microsoft\UserSecrets\<UserSecretsId>\secrets.json
  • macOS/Linux: ~/.microsoft/usersecrets/<UserSecretsId>/secrets.json

Clean up

  1. Open a terminal and navigate to the /infra directory in this solution.

  2. Type azd down

    azd down

Guidance

Region Availability

This template uses gpt-4o and text-embedding-3-large models which may not be available in all Azure regions. Check for up-to-date region availability and select a region during deployment accordingly

  • We recommend using `eastus2', 'eastus', 'japaneast', 'uksouth', 'northeurope', or 'westus3'

Costs

You can estimate the cost of this project's architecture with Azure's pricing calculator

As an example in US dollars, here's how the sample is currently built:

Average Daily Cost:

  • Azure Cosmos DB Serverless ($0.25 USD per 1M RU/s): $0.25
  • Azure App Service (B3 Plan): $1.20
  • Azure OpenAI (GPT-4o 1M input/output tokens): $20 (Sample uses 10K tokens)
  • Azure OpenAI (text-3-large): < $0.01 (Sample uses 5K tokens)

Resources

To learn more about the services and features demonstrated in this sample, see the following:

About

A multi-agent sample and workshop for a retail banking scenario. Implemented in both C# using Semantic Kernel Agents and Python using LangGraph.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Bicep 33.9%
  • C# 29.2%
  • Python 19.0%
  • TypeScript 10.8%
  • CSS 3.1%
  • HTML 2.3%
  • Other 1.7%