Carlos, The Cloud Architect

Carlos

Overview

Carlos the Architect implements a multi-agent Software Development Lifecycle (SDLC) for cloud infrastructure design. The system uses 11 specialized AI agents orchestrated through LangGraph to automate the complete journey from requirements gathering to production-ready Terraform code, with historical learning from past deployment feedback.

┌───────────────────────────────────────────────────────────────────────────────────┐
│ AGENTIC SDLC PIPELINE │
├───────────────────────────────────────────────────────────────────────────────────┤
│ │
│ REQUIREMENTS ──► LEARNING ──► DESIGN ──► ANALYSIS ──► REVIEW ──► DECISION ──► CODE │
│ │ │ │ │ │ │ │ │
│ [Gathering] [Historical] [Carlos] [Security] [Auditor] [Recommender] [TF] │
│ │ [Learning] [Ronei] [Cost] │ │ │ │
│ │ │ ║ [SRE] │ │ │ │
│ ▼ ▼ ▼ ▼ ▼ ▼ ▼ │
│ Questions Context 2 Designs 3 Reports Approval Selection IaC │
│ from feedback │
└───────────────────────────────────────────────────────────────────────────────────┘

SDLC Phases Mapped to Agents

SDLC PhaseAgent(s)OutputPurpose
1. RequirementsRequirements GatheringClarifying questionsUnderstand user needs
2. LearningHistorical LearningContext from past designsLearn from deployment feedback
3. DesignCarlos + Ronei (parallel)2 architecture designsCompetitive design generation
4. AnalysisSecurity, Cost, SRE (parallel)3 specialist reportsMulti-dimensional review
5. ReviewChief AuditorApproval decisionQuality gate
6. DecisionDesign RecommenderFinal recommendationSelect best design
7. ImplementationTerraform CoderInfrastructure-as-CodeProduction-ready output

Agent Architecture

The 11 Agents

┌─────────────────────────────────────────────────────────────────┐
│ AGENT HIERARCHY │
├─────────────────────────────────────────────────────────────────┤
│ │
│ TIER 1: PRIMARY ARCHITECTS (GPT-4o) │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ CARLOS │ │ RONEI │ │
│ │ Conservative │ vs │ Innovative │ │
│ │ AWS-native │ │ Kubernetes │ │
│ │ temp: 0.7 │ │ temp: 0.9 │ │
│ └─────────────────┘ └─────────────────┘ │
│ ▲ ▲ │
│ └───────┬─────────────┘ │
│ │ │
│ TIER 0.5: HISTORICAL LEARNING (No LLM - Data Query) │
│ ┌─────────────────────────────────────────┐ │
│ │ Historical Learning │ │
│ │ (Queries Cosmos DB for past feedback) │ │
│ └─────────────────────────────────────────┘ │
│ │
│ TIER 2: SPECIALIST ANALYSTS (GPT-4o-mini) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Security │ │ Cost │ │ SRE │ │
│ │ Analyst │ │ Analyst │ │ Engineer │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ TIER 3: DECISION MAKERS (GPT-4o) │
│ ┌──────────┐ ┌───────────┐ ┌───────────┐ │
│ │ Auditor │ │Recommender│ │ Terraform │ │
│ │ Chief │ │ Design │ │ Coder │ │
│ └──────────┘ └───────────┘ └───────────┘ │
│ │
│ TIER 0: REQUIREMENTS (GPT-4o-mini) │
│ ┌───────────────────┐ │
│ │ Requirements │ │
│ │ Gathering │ │
│ └───────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘

Agent Details

1. Requirements Gathering Agent

  • Model: GPT-4o-mini (cost-optimized)
  • Role: Initial clarification of user needs
  • Output: 3-5 clarifying questions about:
    • Workload characteristics (traffic, data volume, users)
    • Performance requirements (latency, throughput, SLAs)
    • Security & compliance needs
    • Budget constraints
    • Deployment preferences

1.5 Historical Learning Node

  • Model: None (data query only)
  • Role: Learn from past deployment feedback
  • Data Source: Azure Cosmos DB (deployment feedback)
  • Process:
    1. Extract keywords from refined requirements
    2. Query similar past designs from feedback store
    3. Categorize feedback by success (4-5 stars) vs problems (1-2 stars)
    4. Extract patterns that worked well
    5. Extract warnings from problematic deployments
  • Output: Formatted context injected into design prompts
  • Graceful Degradation: Returns empty context on failure (5s timeout)

2. Carlos (Lead Cloud Architect)

  • Model: GPT-4o (main pool)
  • Temperature: 0.7 (balanced)
  • Personality: Pragmatic, conservative, dog-themed
  • Focus: AWS-native managed services, proven patterns, simplicity
  • Output: Complete architecture design with Mermaid diagram
  • Philosophy: “If it ain’t broke, don’t fix it”

3. Ronei (Rival Architect – “The Cat”)

  • Model: GPT-4o (ronei pool)
  • Temperature: 0.9 (more creative)
  • Personality: Cutting-edge, competitive, cat-themed
  • Focus: Kubernetes, microservices, serverless, service mesh
  • Output: Alternative architecture design with Mermaid diagram
  • Philosophy: “Innovation drives excellence”

4. Security Analyst

  • Model: GPT-4o-mini
  • Focus Areas:
    • Network exposure & segmentation
    • Identity & access management
    • Data encryption (transit + rest)
    • Logging & monitoring
    • Incident response readiness

5. Cost Optimization Specialist

  • Model: GPT-4o-mini
  • Focus Areas:
    • Major cost drivers identification
    • Reserved instances / savings plans
    • Spot/preemptible instance opportunities
    • Storage lifecycle & archival
    • FinOps best practices

6. Site Reliability Engineer (SRE

  • Model: GPT-4o-mini
  • Focus Areas:
    • Failure scenarios & blast radius
    • Capacity planning & auto-scaling
    • Observability (metrics, logs, traces)
    • Health checks & alerting
    • Operational runbooks

7. Chief Architecture Auditor

  • Model: GPT-4o (main pool)
  • Role: Final quality gate
  • Decision: APPROVED or NEEDS REVISION
  • Output: Executive summary with strengths and required changes

8. Design Recommender

  • Model: GPT-4o (main pool)
  • Role: Select the winning design
  • Decision: Must choose exactly one (Carlos OR Ronei)
  • Output: Recommendation with justification and tradeoffs

9. Terraform Coder

  • Model: GPT-4o (main pool)
  • Role: Generate production-ready infrastructure-as-code
  • Output:
    • main.tf – Resource definitions
    • variables.tf – Input variables
    • outputs.tf – Output values
    • versions.tf – Provider configuration
    • Deployment instructions

Workflow Graph

LangGraph State Machine

                              START
                                │
                                ▼
                    ┌───────────────────────┐
                    │  Has User Answers?    │
                    └───────────────────────┘
                           │         │
                          NO        YES
                           │         │
                           ▼         │
              ┌────────────────────┐ │
              │   Requirements     │ │
              │    Gathering       │ │
              └────────────────────┘ │
                           │         │
                           ▼         │
              ┌────────────────────┐ │
              │ Clarification      │ │
              │ Needed?            │ │
              └────────────────────┘ │
                    │         │      │
                   YES       NO      │
                    │         │      │
                    ▼         ▼      ▼
                  END    ┌─────────────────┐
            (wait for    │     Refine      │
             answers)    │  Requirements   │
                         └─────────────────┘
                                  │
                                  ▼
                         ┌─────────────────┐
                         │   HISTORICAL    │
                         │    LEARNING     │
                         │ (query feedback)│
                         └─────────────────┘
                                  │
                    ┌─────────────┴─────────────┐
                    │                           │
                    ▼                           ▼
           ┌──────────────┐            ┌──────────────┐
           │    CARLOS    │            │    RONEI     │
           │   (design)   │  PARALLEL  │   (design)   │
           │ +historical  │            │ +historical  │
           │   context    │            │   context    │
           └──────────────┘            └──────────────┘
                    │                           │
                    └─────────────┬─────────────┘
                                  │
              ┌───────────────────┼───────────────────┐
              │                   │                   │
              ▼                   ▼                   ▼
       ┌────────────┐      ┌────────────┐      ┌────────────┐
       │  SECURITY  │      │    COST    │      │    SRE     │
       │  ANALYST   │      │  ANALYST   │      │  ENGINEER  │
       └────────────┘      └────────────┘      └────────────┘
              │                   │                   │
              └───────────────────┼───────────────────┘
                                  │
                                  ▼
                         ┌──────────────┐
                         │   AUDITOR    │
                         │   (review)   │
                         └──────────────┘
                                  │
                    ┌─────────────┴─────────────┐
                    │                           │
               APPROVED                   NEEDS REVISION
                    │                           │
                    ▼                           │
           ┌──────────────┐                     │
           │ RECOMMENDER  │                     │
           │  (decision)  │                     │
           └──────────────┘                     │
                    │                           │
                    ▼                           │
           ┌──────────────┐                     │
           │  TERRAFORM   │◄────────────────────┘
           │    CODER     │      (revision loop)
           └──────────────┘
                    │
                    ▼
                   END

https://github.com/rtrentin73/carlos-the-architect

Leave a Reply