> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Examples

> Complete, runnable templates you can copy, publish, and build.

Each template below is a full `orgo.ai/v1` document. Copy it, [publish and build](/guides/templates/quickstart#author-your-own) it, then launch a computer from its ref. The first four use the short [sugar form](/guides/templates/schema#sugar-form). The last uses the canonical form.

<Note>
  Publishing and building templates requires a [Scale plan](https://www.orgo.ai/#pricing). Launching one, curated or your own, requires a paid plan and counts against the workspace owner's computer quota.
</Note>

## Minimal

The smallest valid template, a blank Linux computer. Everything except `api_version` and the name/version is optional.

```yaml my-template.yaml theme={null}
api_version: orgo.ai/v1
name:    my-template@1.0.0
cpu:     2
ram:     4gb
display: 1280x800
```

## Static site (nginx)

A single HTTP service on port 8000, served by nginx, with Chrome set to auto-open the page when the desktop starts. The headline is driven by a compile-time [variable](/guides/templates/schema#vars-and-interpolation), so changing it is a one-line edit.

```yaml static-site.yaml theme={null}
api_version: orgo.ai/v1
name:    static-site@1.0.0
cpu:     2
ram:     4gb
display: 1280x800

vars:
  headline: "Hello from Orgo"

files:
  /opt/site/index.html: |
    <!doctype html>
    <html>
      <head><title>${var.headline}</title></head>
      <body style="font-family: sans-serif; padding: 2rem;">
        <h1>${var.headline}</h1>
        <p>Edit the template and rebuild.</p>
      </body>
    </html>

  /etc/nginx/sites-available/orgo:
    mode: "0644"
    inline: |
      server {
        listen 8000 default_server;
        root /opt/site;
        index index.html;
        location / { try_files $uri $uri/ =404; }
      }

apps:
  - name: nginx
    title: "nginx"
    install: |
      apt-get update -qq
      apt-get install -y --no-install-recommends nginx
      ln -sf /etc/nginx/sites-available/orgo /etc/nginx/sites-enabled/orgo
      rm -f /etc/nginx/sites-enabled/default
    services:
      - name: nginx
        run: "nginx -g 'daemon off;'"
        user: root
        restart: always
    health:
      type: http
      url: http://127.0.0.1:8000/
      every: 15s
      retries: 3
      on_fail: restart_service:nginx
    ports:
      - { internal: 8000, public: true }

  # A second "app" with no install or service, only an autostart entry
  # that opens Chrome on the page once the desktop is up. The command
  # opens a local port, so Orgo waits for that port to answer, then waits
  # the 4s delay, before it launches Chrome.
  - name: chrome
    title: "Chrome"
    autostart:
      - run: "google-chrome-stable --no-sandbox --disable-gpu --no-first-run --no-default-browser-check http://127.0.0.1:8000"
        delay: 4
```

## Browser desktop

Chrome launches automatically on boot. Chrome is already in the base image, so there's no install step, only an [`autostart`](/guides/templates/schema#apps) entry.

```yaml browser-desktop.yaml theme={null}
api_version: orgo.ai/v1
name:    browser-desktop@1.0.0
cpu:     2
ram:     4gb
display: 1280x800

apps:
  - name: chrome
    title: "Chrome"
    autostart:
      - run: "google-chrome-stable --no-sandbox --disable-gpu --no-first-run --no-default-browser-check https://orgo.ai"
        delay: 2
```

## Background worker with triggers

A long-running [service](/guides/templates/schema#apps) that logs a tick every 10 seconds, kept alive by a process [health check](/guides/templates/schema#apps), plus two [triggers](/guides/templates/triggers): a cron heartbeat and a CPU watchdog that writes a `notify` line to the trigger log (`/var/log/orgo/triggers.log`) on sustained load.

```yaml heartbeat-worker.yaml theme={null}
api_version: orgo.ai/v1
name:    heartbeat-worker@1.0.0
cpu:     2
ram:     4gb
display: 1280x800

vars:
  worker_name: "heartbeat"

env:
  WORKER_NAME: "${var.worker_name}"

files:
  /opt/worker/run.sh:
    mode: "0755"
    inline: |
      #!/bin/bash
      set -e
      while true; do
        echo "[$(date -Iseconds)] ${WORKER_NAME} tick"
        sleep 10
      done

apps:
  - name: worker
    title: "Heartbeat worker"
    services:
      - name: heartbeat-worker
        run: "/opt/worker/run.sh"
        restart: always
    health:
      type: process
      process: run.sh
      every: 30s
      retries: 3
      on_fail: restart_service:heartbeat-worker

triggers:
  - name: minute-mark
    source: { type: cron, schedule: "* * * * *" }
    actions:
      - type: log
        message: "minute mark"

  - name: cpu-watchdog
    source:
      type: metric
      metric: cpu_percent
      op: ">"
      value: 80
      duration: 30s
    dedup: { cooldown: 2m }
    actions:
      - type: notify
        title: "CPU hot"
        level: warning
```

## Agent with a user-supplied key

The canonical form, with a [secret](/guides/templates/secrets) the launching user supplies from their vault. The CLI is installed at build time, and the `claude-code` [terminal](/guides/templates/schema#terminal) session runs it. When the launching user has `ANTHROPIC_API_KEY` set, the launch cold-boots with `/root/.env` already written, so `claude` starts with their key. This is the pattern the curated `system/coding` template uses.

```yaml claude-code.yaml theme={null}
api_version: orgo.ai/v1

template:
  name: claude-code
  version: 1.0.0
  description: Claude Code CLI, ready in the terminal.

hardware:
  cpu: 2
  ram_gb: 4
  resolution: 1280x720x24

secrets:
  - name: anthropic_api_key
    description: Anthropic API key, used by Claude Code when set.
    optional: true

apps:
  - name: claude-code
    title: Claude Code
    install: |
      curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
      apt-get install -y nodejs
      npm install -g @anthropic-ai/claude-code

terminal:
  - name: claude-code
    cwd: /root
    run: claude
```

## Publish, build, launch

The flow is the same for every template on this page:

```bash theme={null}
# Publish + build the golden snapshot in one call
curl -X POST "https://www.orgo.ai/api/templates?auto_build=true" \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/yaml" \
  --data-binary @static-site.yaml

# Poll until the build is ready
curl https://www.orgo.ai/api/templates/default/static-site/1.0.0/build \
  -H "Authorization: Bearer $ORGO_API_KEY"

# Launch a computer from it
curl -X POST https://www.orgo.ai/api/computers \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"workspace_id\": \"$WORKSPACE_ID\", \"name\": \"site-1\", \"template_ref\": \"default/static-site@1.0.0\"}"
```

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/guides/templates/quickstart">
    The full walkthrough, end to end.
  </Card>

  <Card title="Schema reference" icon="file-code" href="/guides/templates/schema">
    Every field explained.
  </Card>

  <Card title="Secrets" icon="key" href="/guides/templates/secrets">
    The full secret-injection model.
  </Card>

  <Card title="Publish API" icon="code" href="/api-reference/templates/publish">
    Ship a template over HTTP.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.