Lesson 0 — Prerequisites

You are here: Lesson 0 of 8 · Hub · Next: Create an agent →

Goal

Confirm you can talk to an Aiden OS tenant from Terraform/OpenTofu, and understand the map of what this series builds.

What you need

Item Why
OpenTofu ≥ 1.5 or Terraform ≥ 1.5 Apply the step roots
StackGen Aiden OS URL + PAT stackgen_url / stackgen_token
Provider registry access releases.stackgen.com — see Prerequisites
Optional: LLM API key Only for Lesson 04+ when you register models with sg_secret / sg_guild_model_*. Aiden already ships with one base model.
Optional: GitHub PAT Lessons 03+ (integration + knowledge sync)

Full checklist: Prerequisites.

Mental map (what you will build)

provider "sg"
    │
    ├─ Lesson 04: sg_secret → sg_llm_provider → sg_llm_model
    ├─ Lesson 03: sg_secret + sg_integration  →  tools + knowledge source
    ├─ Lesson 02: sg_knowledge_hub
    ├─ Lesson 01: sg_agent (persona, then grows)
    ├─ Lesson 05: skills/*.md  (+ skillsync, not apply)
    └─ Lessons 06–08: sg_workflow + sg_runbook_sop (+ second agent)

Plain analogy: You are writing a recipe book in Git. Each lesson adds one ingredient. Apply cooks that recipe into the live kitchen (your Aiden tenant).

Clone and locate the companion

git clone https://github.com/appcd-dev/solutions.git
cd solutions/examples/scenarios/agent-as-code

Each lesson points at steps/0N-…. Later steps include earlier concepts — you can jump ahead, but you must supply the same variables the later step expects.

Shared variables (you will reuse these)

export TF_VAR_stackgen_url="https://your-tenant.stackgen.com"
export TF_VAR_stackgen_token="sg_pat_..."
# Optional org scope:
# export TF_VAR_stackgen_project_id="..."

Models are optional for Lessons 01–03. Aiden comes with one base model out of the box, so you do not need TF_VAR_model_names. The agent will use that base model when model_names is omitted.

Only set models explicitly if you want to pin a different registered model, or when you reach Lesson 04 to register your own with raw sg_secret / sg_guild_model_*:

# Optional — pin a specific existing model instead of the built-in base model
# export TF_VAR_model_names='["your-existing-model-name"]'

# Lesson 04 — register additional models (needs an API key)
# export TF_VAR_openai_api_key="sk-..."

Checkpoint

Next: Lesson 01 — Create an agent