Skip to main content
⏳ Estimated read time: 3 min read

StackBuilder: Infra Generation and Deployment Agent For Developers And Platform Engineers

This guide helps developers get started with the agent-powered infrastructure assistant designed to simplify Day 0–2 infrastructure operations through natural language.

What Are StackGen AI Agents?

StackGen AI agents are AI-based solutions that combine deterministic controls and generative AI to help with infrastructure lifecycle management. This includes AI agents for building, deploying, and managing cloud infrastructure. It's powered by multiple agents that automate infrastructure tasks, allowing platform and product teams to focus on more differentiated tasks like architecture reviews and shipping features.

Supported Tasks Across the Lifecycle:

  • Day 0 – Infrastructure Generation (e.g., generating IaC, configuring storage, network, and variables.)
  • Day 1 – Monitoring, drift detection, compliance checks (coming soon)
  • Day 2 – Incident response and auto-remediation (coming soon)

Stackbuilder has two workflows:

  • TF Module Coding Agent for platform engineers
  • Self-service agent for developers to generate infrastructure restricted by guardrails set by the platform engineering team. Let’s look at how this can be done in StackGen.

Follow these steps to navigate to the StackBuilder developer self-service agent:

  1. From the StackGen Home page, click Assist Me.

    assist me

    • Alternatively, you can also type assist me in your stackgen URL like this: <stackgen_url>/assist-me
  2. You can either open the StackBuilder agent or share the environment-specific link to the Agent with your Developers.

  3. When you click the Assist Me button for the first time, you will be redirected to the landing page:

    assist me

  4. Click the Let’s Get Started button to start using the StackBuilder agent.

Using the Developer Self-Service Agentic Workflow

note

While connections, attribute filling, and policy violation fixes still require manual intervention, the generated infrastructure is accurate enough for a baseline deployment with correct attribute values.

This section walks you through the ideal user flow ("happy path") for using the StackGen AI agent to support Day 0–2 developer tasks such as infrastructure-as-code (IaC) generation, deployment, and validation. It also outlines the known limitations and caveats to be aware of when using it.

The StackBuilder agent is designed to assist with:

  1. Generating Infrastructure as Code (IaC)
  2. Pushing your changes to Pipeline (e.g. GitHub, Gitlab, etc.)
  3. Catching errors and providing helpful feedback for:
    • IaC configuration
    • Variable configuration errors
    • Policy Violations
    • Governance Violations
    • Pipeline errors

To get started with the StackBuilder Developer self-service agentic workflow, just enter your prompt in the chat window. Let’s see some sample prompts.

Create a Versioned S3 Bucket Using Terraform

Click to view

Run the prompt Generate Terraform code to create an AWS S3 bucket with versioning enabled.

Prompt1

Your appStack will look like the one below:

Prompt1a

Generate Infrastructure for Deploying a Website on AWS

Click to view

Run the prompt Give me the infrastructure to run my website on AWS.

Prompt2

Your appStack will look like the one below:

Prompt2a

Generate Infrastructure for Deploying a Serverless Function in AWS With SNS

Click to view

Run the prompt Create an infrastructure to deploy a serverless function in AWS with an SNS.

Prompt3

Your appStack will look like the one below:

Prompt3a

Create Infrastructure in a Project With Existing Custom Modules

Click to view

Run the prompt Help me create an infrastructure using an instance template and a compute instance in GCP.

Prompt4

note

For this prompt to work, you should have already created an Instance Template custom module via the Module Editor and published it in your Catalog. These modules were used as expected in the topology, and the IaC had correct references to the custom modules.

Your appStack will look like the one below:

Prompt4a

💼 Pro Tip: Use YAML to Generate Iac

Click to view

You can give a command to generate an IaC or validate your code and create one as shown below:

apiVersion: stackgen.io/v1
kind: ApplicationIntent
metadata:
name: user-service
team: backend-platform
owner: alice@yourcompany.com
environment: production
spec:
runtime:
language: nodejs
version: 18
services:
- type: database
engine: postgresql
version: "15"
- type: cache
engine: redis
cluster_mode: true
compliance:
standards:
- pci-dss
traffic:
expected_rps: 500
peak_rps: 2000
scaling:
strategy: auto
max_replicas: 10
min_replicas: 2
ingress:
expose: true
protocol: https
domain: user.yourcompany.com
dependencies:
- type: internal
name: auth-service
- type: external
name: stripe-api
access_method: https
observability:
logging: enabled
monitoring: enabled
alerts:
- type: latency
threshold_ms: 500
- type: error_rate
threshold_percent: 1
tags:
cost_center: payments
service_tier: critical
owner: backend-platform

Prompt5

Your appStack will look like the one below:

Prompt5a

Alternatively, you can pass a simple prompt like:

I'm looking for a Node.js user service using PostgreSQL and Redis. It must be PCI compliant for handling payments, integrate with our auth-service and Stripe, and support 500 RPS (up to 2000 RPS at peak). Can you generate an IaC for this?

Prompt6

Your appStack will look like the one below. You’ll have to fix configuration errors manually or seek help from your DevOps team.

Prompt6a

What Happens When Governance Is Applied?

Click to view

Let’s say your DevOps has applied a governance restriction to your project where the appstack compute is restricted to AKS. In such a case, the AI agent will not proceed any further and will explain the underlying reason. In some cases, it may go ahead and choose an alternate automatically.

In the following prompt, our Governance Restriction on your project, where the appstack compute is restricted to AKS, exists. And we prompt the agent to: Help me create an AWS infrastructure to deploy an S3 bucket.

As you notice, the compute is restricted to AWS. The agent errors out, adhering to the governance restriction.

Prompt7