Skip to content

DevOps Vertical

The DevOps vertical provides infrastructure automation, deployment, and operations capabilities. It is designed to compete with Terraform Cloud AI, Pulumi Copilot, and GitLab Duo.

Overview

The DevOps vertical (victor/devops/) handles infrastructure-as-code, container orchestration, CI/CD pipeline management, and cloud operations. It supports multiple cloud providers and infrastructure tools with built-in safety checks for production environments.

Key Use Cases

  • Infrastructure Provisioning: Create and manage cloud resources with Terraform, Pulumi, or CloudFormation
  • Container Management: Docker image builds, Kubernetes deployments, and orchestration
  • CI/CD Pipelines: GitHub Actions, GitLab CI, Jenkins pipeline creation and management
  • Deployment Automation: Rolling updates, blue-green deployments, canary releases
  • Monitoring Setup: Configure observability stacks (Prometheus, Grafana, Datadog)
  • Secret Management: Secure handling of credentials and configuration

Available Tools

The DevOps vertical uses the following tools from victor.tools.tool_names:

Tool Description
shell Execute infrastructure commands (terraform, kubectl, docker)
read Read configuration files and templates
write Write infrastructure-as-code files
edit Modify existing configurations
ls List directory contents
grep Search through configuration files
code_search Semantic search for infrastructure patterns
overview Understand project structure
graph Dependency analysis for infrastructure
web_search Look up documentation and best practices
web_fetch Fetch official documentation content

Available Workflows

1. Deployment (deploy.yaml)

Comprehensive deployment workflow with safety gates:

workflows:
  deploy:
    nodes:
      - validate_config      # Check configuration validity
      - check_prerequisites  # Verify dependencies
      - plan_deployment      # Generate deployment plan
      - review_plan          # HITL approval gate
      - execute_deployment   # Apply changes
      - verify_deployment    # Health checks
      - rollback_on_failure  # Automatic rollback if needed

Key Features:
- Pre-deployment validation
- Human-in-the-loop approval for production
- Automatic rollback on failure
- Post-deployment verification
- Multi-environment support (dev, staging, prod)

2. Container Setup (container_setup.yaml)

Docker and container orchestration workflow:

workflows:
  container_setup:
    nodes:
      - analyze_application     # Understand app requirements
      - generate_dockerfile     # Create optimized Dockerfile
      - setup_compose          # Docker Compose for local dev
      - configure_registry     # Container registry setup
      - kubernetes_manifests   # K8s deployment configs
      - helm_chart             # Optional Helm chart generation

Key Features:
- Multi-stage Dockerfile optimization
- Security scanning integration
- Kubernetes manifest generation
- Helm chart scaffolding
- Registry authentication setup

Stage Definitions

The DevOps vertical progresses through these stages:

Stage Description Primary Tools
INITIAL Understanding infrastructure request read, ls, overview
PLANNING Designing infrastructure changes read, web_search, code_search
PROVISIONING Creating infrastructure resources shell, write
CONFIGURING Setting up services and configs write, edit, shell
DEPLOYING Executing deployments shell, read
MONITORING Setting up observability shell, write
COMPLETION Finalizing and documenting write, read

Key Features

Multi-Cloud Support

The DevOps vertical supports multiple cloud providers:

  • AWS: EC2, ECS, EKS, Lambda, CloudFormation
  • Google Cloud: GCE, GKE, Cloud Run, Cloud Functions
  • Azure: VMs, AKS, Container Instances, ARM templates
  • DigitalOcean: Droplets, Kubernetes, App Platform

Infrastructure as Code

Support for major IaC tools:

# Terraform example generated by DevOps vertical
resource "aws_instance" "web" {
  ami           = var.ami_id
  instance_type = var.instance_type

  tags = {
    Name        = "web-server"
    Environment = var.environment
    ManagedBy   = "victor"
  }
}

Container Orchestration

Docker and Kubernetes expertise:

# Kubernetes manifest generated by DevOps vertical
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web-app
  template:
    spec:
      containers:
      - name: web
        image: registry/web-app:latest
        resources:
          limits:
            memory: "256Mi"
            cpu: "500m"

CI/CD Pipeline Generation

Automatic pipeline creation for major platforms:

# GitHub Actions workflow generated by DevOps vertical
name: Deploy
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Deploy to production
        run: |
          ./scripts/deploy.sh

Safety Features

Built-in protection for production environments:

  • Dry-run mode: Preview changes before applying
  • Approval gates: HITL checkpoints for critical operations
  • Rollback plans: Automatic rollback on deployment failure
  • Resource limits: Prevent accidental large-scale changes
  • Secret detection: Block commits containing secrets

Configuration Options

Vertical Configuration

from victor.devops.assistant import DevOpsAssistant

# Get system prompt for DevOps tasks
prompt = DevOpsAssistant.get_system_prompt()

# Get tiered tool configuration
tiered_tools = DevOpsAssistant.get_tiered_tool_config()

# Access capability provider
capabilities = DevOpsAssistant.get_capability_provider()

Environment Configuration

# DevOps environment settings
environments:
  development:
    approval_required: false
    auto_rollback: true

  staging:
    approval_required: false
    auto_rollback: true
    health_check_timeout: 300

  production:
    approval_required: true
    auto_rollback: true
    health_check_timeout: 600
    change_window: "weekdays 9am-5pm"

Workflow Parameters

Common workflow configuration options:

# In workflow YAML
llm_config:
  temperature: 0.1      # Low for precise infrastructure code

tool_budget: 40         # Allow more tool calls for complex infra
timeout: 600            # Longer timeout for provisioning

safety:
  require_approval: true
  dry_run_first: true
  max_resources: 10     # Limit resource creation

Example Usage

Infrastructure Provisioning

from victor.devops.workflows import DevOpsWorkflowProvider

provider = DevOpsWorkflowProvider()
workflow = provider.compile_workflow("deploy")

result = await workflow.invoke({
    "environment": "staging",
    "changes": terraform_plan,
    "approval_required": True
})

Container Setup

result = await workflow.invoke({
    "application_path": "/path/to/app",
    "registry": "ghcr.io/org/app",
    "kubernetes_cluster": "staging-cluster",
    "generate_helm": True
})

Using the DevOps Assistant Directly

from victor.agent.orchestrator import AgentOrchestrator

orchestrator = AgentOrchestrator(
    vertical="devops",
    provider="anthropic",
    model="claude-sonnet-4-5"
)

response = await orchestrator.chat(
    "Create a Terraform module for an AWS EKS cluster with autoscaling"
)

Integration with Other Verticals

The DevOps vertical integrates with:

  • Coding: Deploy code changes after review
  • RAG: Search infrastructure documentation
  • Research: Look up cloud provider best practices

File Structure

victor/devops/
├── assistant.py          # DevOpsAssistant vertical definition
├── capabilities.py       # Capability providers
├── mode_config.py        # Mode configurations
├── prompts.py            # Prompt templates
├── safety.py             # Safety checks for infrastructure
├── tool_dependencies.py  # Tool dependency configuration
├── workflows/
│   ├── deploy.yaml       # Deployment workflow
│   └── container_setup.yaml  # Container orchestration
├── handlers.py           # Compute handlers
├── escape_hatches.py     # Complex condition logic
├── rl.py                 # Reinforcement learning config
└── teams.py              # Multi-agent team specs

Best Practices

  1. Always use dry-run first: Preview infrastructure changes before applying
  2. Require approval for production: Enable HITL gates for prod deployments
  3. Version your infrastructure: Use Git for IaC version control
  4. Implement rollback plans: Always have a way to undo changes
  5. Use secrets management: Never hardcode credentials in configs
  6. Tag resources: Apply consistent tagging for cost tracking
  7. Monitor deployments: Set up alerts for deployment health
  8. Document changes: Maintain runbooks and change logs

Security Considerations

  • Least privilege: Request minimal IAM permissions
  • Network isolation: Use VPCs and security groups
  • Encryption: Enable encryption at rest and in transit
  • Audit logging: Enable CloudTrail/Stackdriver logging
  • Secret rotation: Implement automatic secret rotation
  • Compliance: Follow CIS benchmarks for cloud security