Skip to content

aws-samples/sample-genai-aws-solutions-architect-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

GenAI AWS Solutions Architect

⚠️ DISCLAIMER: This is a prototype project for demonstration and experimentation purposes only. It is not production-ready and should not be used in production environments without significant additional development, testing, and security hardening.

Demo

Application Demo

πŸ“Ή Watch Full Demo Video

Overview

Transform business requirements into AWS native architectures - no prior AWS knowledge required. This GenAI Solution Architecture Agent guides technical and non-technical users alike through collaborative architectural design, from initial business requirements to deployment-ready solutions with full cost analysis and ROI projections.

Through progressive discovery, simply describe your business challenge and the agent works with you to:

  • Gather and refine requirements through natural conversation
  • Design Well-Architected AWS solutions aligned to your needs
  • Provide detailed cost analysis and ROI calculations
  • Generate deployment and scale-out plans
  • Deliver complete business case documentation

Perfect for business stakeholders, product managers, startup founders, and solution architects who need to evaluate AWS solutions quickly and comprehensively.

The agent excels across all six Well-Architected Framework pillars: Operational Excellence, Security, Reliability, Performance Efficiency, Cost Optimization, and Sustainability. It provides intelligent requirements gathering, visual architecture generation, comprehensive cost analysis, and best practice guidance with proper source citations from official AWS documentation.

Features

  • AI-Powered Architecture: Intelligent agent with native MCP integration for comprehensive AWS solution design
  • Deterministic File Writing: Native file writing tool ensures all outputs are reliably saved to /generated-diagrams/ directory
  • MCP Server Integration: Connects to remote Model Context Protocol servers:
    • AWS Knowledge Server (remote)
    • AWS Pricing Server (remote)
    • AWS Diagram Server (remote)
  • Interactive Workflow: Guided 4-phase process (Discovery β†’ Architecture β†’ Cost β†’ WAR)
  • File Management: All outputs automatically saved to /generated-diagrams/ directory with guaranteed reliability
  • Enhanced UI: Streamlit interface with real-time logs, multiline chat input, and industry-focused sample prompts
  • Agent Reasoning Display: Real-time visibility into agent's thinking process and tool execution
  • Three-Column Layout: Agent Tools & Reasoning (left), Chat Interface (center), Sample Prompts & Generated Assets (right)

Prerequisites

  • Python 3.8+
  • uvx tool for running remote MCP servers: pip install uvx
  • AWS credentials configured for Bedrock access

AWS Credentials

You'll need to configure your environment with AWS credentials that have permissions to invoke the Anhtopic's Claude models via Amazon Bedrock. You can set up your credentials in several ways:

  1. Environment variables: Set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and optionally AWS_SESSION_TOKEN
  2. AWS credentials file: Configure credentials using aws configure CLI command
  3. IAM roles: If running on AWS services like EC2, ECS, or Lambda, use IAM roles
  4. Bedrock API keys: Set the AWS_BEARER_TOKEN_BEDROCK environment variable

Make sure your AWS credentials have the necessary permissions to access Amazon Bedrock and invoke the Claude models.

Configuration

The application uses centralized configuration in src/agent/config/agent_config.py:

AWS Settings

  • Region: us-east-1 (default)
  • Bedrock Model: Anthropic Claude Sonnet 4.6 with global cross-region inference
  • Rate Limiting: 5 requests per 60-second window
  • Max Tokens: 10,000 token limit per response

Available Models

  • Anthropic Claude Sonnet 4.6 (commented)
  • Anthropic Claude Sonnet 4.5 (active)
  • Anthropic Claude Sonnet 4 (commented)
  • Anthropic Claude 3.7 Sonnet (commented)

Setup

  1. Create and activate virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the application:

    streamlit run app.py
  4. Access the interface:

Project Structure

β”œβ”€β”€ app.py                        # Main Streamlit interface
β”œβ”€β”€ requirements.txt              # Python dependencies
β”œβ”€β”€ .gitignore                   # Git ignore rules
β”œβ”€β”€ src/                         # Source code
β”‚   β”œβ”€β”€ agent/                   # Agent implementation
β”‚   β”‚   β”œβ”€β”€ __init__.py          # Agent package init
β”‚   β”‚   β”œβ”€β”€ aws_architect.py     # Main Strands-based agent
β”‚   β”‚   β”œβ”€β”€ rate_limiter.py      # Rate limiting functionality
β”‚   β”‚   └── config/              # Agent configuration
β”‚   β”‚       β”œβ”€β”€ __init__.py      # Config package init
β”‚   β”‚       β”œβ”€β”€ agent_config.py  # AWS, Bedrock settings
β”‚   β”‚       └── prompts.py       # System prompts and instructions
β”‚   β”œβ”€β”€ ui/                      # UI resources
β”‚   β”‚   β”œβ”€β”€ __init__.py          # UI package init
β”‚   β”‚   └── sample-prompts.json  # Industry-focused example prompts
β”‚   └── utils/                   # Utility functions
β”‚       β”œβ”€β”€ __init__.py          # Utils package init
β”‚       └── file_writer.py       # File writing tool (text and binary)
β”œβ”€β”€ assets/                      # Logo and diagram assets
β”‚   β”œβ”€β”€ aws-logo.png            # AWS logo
β”‚   β”œβ”€β”€ bedrock-logo.png        # Bedrock logo
β”‚   β”œβ”€β”€ class_diagram.png       # Class diagram image
β”‚   └── class_diagram.puml      # PlantUML class diagram
β”œβ”€β”€ install-dependencies/        # Installation scripts
β”‚   └── amazon-linux-python-install.sh  # Amazon Linux setup
└── generated-diagrams/          # Generated diagram outputs

Dependencies

  • streamlit: Web interface framework
  • strands: Agent framework with native MCP support
  • mcp: Model Context Protocol client
  • anthropic: Anthropic API client
  • pillow: Image processing
  • matplotlib: Plotting and visualization
  • diagrams: Infrastructure diagram generation
  • graphviz: Graph visualization
  • jschema-to-python: JSON schema to Python conversion
  • sarif-om: SARIF object model

Usage

  1. Start a conversation with the agent using the chat interface
  2. Follow the guided 4-phase workflow:
    • Discovery Phase: Understand business requirements and constraints
    • AWS Solution Architecture: Generate diagrams and technical designs
    • Cost Analysis: Get detailed pricing estimates and optimization recommendations
    • AWS Well-Architected Review: Assess against AWS best practices
  3. Monitor real-time progress in the Agent Reasoning panel
  4. Download generated assets from the Generated Assets panel
  5. Use industry-focused sample prompts for quick starts

Sample Prompt Categories

  • Financial Services: Payment processing, trading platforms, fraud detection
  • Healthcare & Life Sciences: Telemedicine, HIPAA compliance, medical imaging
  • Automotive: Connected cars, autonomous vehicles, fleet management
  • E-commerce & Retail: Marketplace platforms, inventory systems, recommendations
  • Media & Entertainment: Streaming platforms, social media, gaming
  • SaaS Platforms: Multi-tenant architectures, billing integration, CRM systems

MCP Servers

This project uses official AWS Open Source MCP Servers to provide specialized AWS capabilities through the Model Context Protocol.

AWS Knowledge Server

AWS Pricing Server

AWS Diagram Server

All MCP servers are automatically initialized when the agent starts and provide their tools to the agent's capability set.

Troubleshooting

  • MCP Connection Issues: Check internet connectivity for remote servers
  • Missing Files: Ensure generated-diagrams/ directory exists
  • Permission Errors: Verify write permissions for generated-diagrams/ directory
  • Agent Initialization: Check AWS credentials and Bedrock model access

Architecture

Built on the Strands agent framework with native MCP support, providing a clean separation between:

  • Agent Logic: Business reasoning and workflow management
  • MCP Tools: External service integrations (AWS APIs, diagram generation)
  • UI Components: Interactive Streamlit interface with real-time updates
  • Configuration: Centralized settings for models, servers, and prompts

Class Diagram

Class Diagram

The architecture uses composition over inheritance, with the AWSArchitectAgent orchestrating MCP clients through a dedicated manager while delegating core agent functionality to the Strands framework.

Releases

No releases published

Packages

 
 
 

Contributors

Languages