A specialized Claude agent designed to assist with hypervisor and cloud infrastructure programming tasks across AWS, Azure, and Google Cloud Platform.
- Multi-Cloud Support: AWS, Azure, and GCP specific helpers
- Infrastructure as Code: Generate Terraform configurations, CloudFormation templates, ARM templates
- Code Generation: Create SDK examples, Lambda functions, Azure Functions, Cloud Functions
- Best Practices: Provides recommendations based on use cases
- Hypervisor Support: VMware, Hyper-V, KVM guidance
from hypervisor_agent import HypervisorAgent
# Initialize the agent
agent = HypervisorAgent()
# Get help with a specific query
result = agent.suggest_solution("How do I create a Terraform configuration for AWS EC2?", "aws")
print(result['recommendations'])
print(result['code_examples'][0])from aws_helper import AWSHelper
aws = AWSHelper()
# Generate EC2 Terraform configuration
config = {
'name': 'web_server',
'instance_type': 't3.micro',
'ami': 'ami-0abcdef1234567890'
}
terraform_code = aws.generate_terraform_ec2(config)
# Get service recommendations
recommendations = aws.get_service_recommendations('web_application')
# Generate boto3 examples
code = aws.generate_boto3_example('ec2', 'list_instances')from azure_helper import AzureHelper
azure = AzureHelper()
# Generate VM Terraform configuration
config = {
'name': 'web_vm',
'location': 'East US',
'vm_size': 'Standard_B1s'
}
terraform_code = azure.generate_terraform_vm(config)
# Generate Azure SDK examples
code = azure.generate_azure_sdk_example('compute', 'list_vms')from gcp_helper import GCPHelper
gcp = GCPHelper()
# Generate Compute Engine Terraform
config = {
'name': 'web_instance',
'project_id': 'my-project',
'machine_type': 'e2-micro'
}
terraform_code = gcp.generate_terraform_compute(config)
# Get gcloud commands
commands = gcp.get_gcloud_commands('compute')The agent provides specialized recommendations for:
- Web Applications: Load balancing, databases, static assets
- API Backends: Serverless functions, authentication, monitoring
- Data Processing: ETL pipelines, streaming, analytics
- Machine Learning: Training workflows, model serving
- Container Workloads: Kubernetes, container registries
- Infrastructure as Code
- Virtual Machine Management
- Container Orchestration
- Network Configuration
- Storage Management
- Security and Compliance
- Monitoring and Logging
- Cost Optimization
- Migration Strategies
# AWS EC2 Instance Configuration
resource "aws_instance" "web_server" {
ami = "ami-0c55b159cbfafe1d0"
instance_type = "t2.micro"
key_name = "my-key-pair"
vpc_security_group_ids = [aws_security_group.web_server_sg.id]
subnet_id = "subnet-12345678"
tags = {
Name = "Web Server"
Environment = "production"
}
}# Azure Virtual Machine
resource "azurerm_linux_virtual_machine" "example" {
name = "example-vm"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
size = "Standard_B1s"
admin_username = "adminuser"
}# GCP Compute instance
resource "google_compute_instance" "example" {
name = "web-instance"
machine_type = "e2-micro"
zone = "us-central1-a"
boot_disk {
initialize_params {
image = "debian-cloud/debian-11"
}
}
}The project includes a Flask web application that provides an interactive interface to the hypervisor agent.
-
Install dependencies:
pip install -r requirements.txt
-
Start the Flask development server:
python app.py
-
Access the application: Open your browser and navigate to
http://localhost:5000
- Interactive Query System: Ask questions about cloud infrastructure and get code examples
- Multi-Cloud Support: Switch between AWS, Azure, GCP, or auto-detect mode
- Code Generation: Get Terraform configurations, SDK examples, and CLI commands
- Best Practices: View security, performance, cost optimization, and reliability guidelines
- Template Library: Browse pre-built templates for common infrastructure patterns
/- Home page with overview and navigation/query- Interactive query interface for asking questions/aws- AWS-specific helpers and examples/azure- Azure-specific helpers and examples/gcp- Google Cloud Platform helpers and examples/hypervisors- Hypervisor-specific guidance (VMware, Hyper-V, KVM)/best_practices- Cloud infrastructure best practices/sdk_examples- SDK code examples for all cloud providers/terraform- Terraform configuration templates
Run the simple test to verify functionality:
python simple_test.pyFor comprehensive testing (requires fixing template issues):
python test_agent.pyhypervisor_agent.py- Main agent class with multi-cloud supportaws_helper.py- AWS-specific code generation and helpersazure_helper.py- Azure-specific code generation and helpersgcp_helper.py- GCP-specific code generation and helpersconfig.py- Configuration, templates, and best practicessimple_test.py- Basic functionality testtest_agent.py- Comprehensive test suite
- EC2, Lambda, ECS, EKS, S3, RDS, VPC, CloudFront, Route53
- Virtual Machines, Functions, AKS, Storage, SQL Database, VNet
- Compute Engine, Cloud Functions, GKE, Cloud Storage, Cloud SQL
The agent includes built-in best practices for:
- Security: IAM roles, encryption, least privilege
- Performance: Right-sizing, auto-scaling, caching
- Cost Optimization: Reserved instances, lifecycle policies
- Reliability: Multi-AZ deployment, health checks, backups
To extend the agent:
- Add new cloud providers in the respective helper files
- Update configuration templates in
config.py - Add test cases in
test_agent.py - Update this README with new capabilities
This project is provided as-is for educational and development purposes.