This workshop demonstrates how to build a multi-tenant, multi-agent architecture for a SaaS platform called "SmartResolve" - a generative AI-powered intelligent resolution engine for technical support.
The solution implements a multi-tenant architecture with the following components:
- Knowledge Base: A pooled knowledge base with tenant isolation through metadata filtering
- Agents: Multiple specialized agents for different tasks
- Tenant Isolation: Implemented through metadata filtering and session attributes
The solution supports multiple tenants, with the following example tenants:
- ClearPay (FinTech): A company that provides payment and transaction reconciliation services for small to mid-sized financial institutions.
- MediOps (HealthTech): A platform offering EHR (Electronic Health Records) infrastructure and automation tools for medium-sized healthcare providers.
Each tenant has the following data structure in Amazon Simple Storage Service (Amazon S3):
tenant-id/
├── logs/
│ └── microservice-logs.json
├── kb/
│ └── [knowledge-base-documents].md
├── resolutions/
│ └── [resolution-documents].md
├── sops/
│ └── [sop-documents].md
├── meeting-notes.txt
└── [tenant]_Error_Codes.txt
The technical support agent provides the following capabilities:
- Knowledge Base Search: Search the knowledge base for relevant information
- Error Code Lookup: Get details about specific error codes
- Log Analysis: Search logs for specific patterns or time periods
- Issue Management: Create, view, and resolve technical support issues
The solution uses a multi-agent architecture with the following components:
- Orchestrator Agent: Coordinates the work of specialized agents
- Knowledge Base Agent: Queries the knowledge base for relevant information
- Log Agent: Analyzes logs to identify issues
- Code Agent: Generates code to fix issues
Tenant isolation is implemented through the following mechanisms:
- Amazon S3 Object Metadata: Each object in Amazon S3 has a
tenant_idmetadata field - Session Attributes: The tenant ID is passed as a session attribute to agents
- Amazon DynamoDB Partitioning: Data in Amazon DynamoDB is partitioned by tenant ID
- AWS Identity and Access Management (IAM) Policies: IAM policies restrict access to tenant-specific resources
The knowledge base contains the following types of documents:
- Error Codes: Documentation of error codes and their resolutions
- SOPs: Standard Operating Procedures for routine operational activities such as incident response, system maintenance, and data backup procedures
- Resolution Documents: Documentation of past issue resolutions
- Knowledge Base Documents: General knowledge base articles
The solution includes mock data for the following tenants:
-
ClearPay (FinTech):
- Error codes related to payment processing
- SOPs for transaction handling
- Resolution documents for common payment issues
-
MediOps (HealthTech):
- Error codes related to EHR systems
- SOPs for patient data handling
- Resolution documents for common healthcare IT issues
To deploy the solution:
- Run the AWS Cloud Development Kit (AWS CDK) deployment script
- Provision tenants using the tenant provisioning script
- Generate mock data for each tenant
The workshop consists of the following labs:
-
Lab 1: Multi-tenant RAG architecture
- Introduction to multi-tenant RAG
- Querying the knowledge base with tenant isolation
-
Lab 2: Multi-tenant multi-agents architecture
- Introduction to multi-agent systems
- Orchestrating multiple agents for multi-step troubleshooting scenarios, such as analyzing logs, querying knowledge bases, and generating resolution recommendations
-
Lab 3: Tenant isolation
- Implementing tenant isolation through metadata filtering
- Implementing tenant data protection with enhanced security features through IAM policies
-
Lab 4: Cost per tenant
- Tracking and analyzing costs per tenant
- Implementing cost optimization strategies including resource right-sizing, usage monitoring, and automated scaling policies