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

# Examples

> Three end-to-end examples of long-horizon work on Vetta.

Three scenarios showing how the primitives compose into real jobs, using what the platform does today (coming-soon pieces marked).

## Nightly repo triage

**A scheduled agent that wakes at 9:00 UTC, works, publishes a report, and sleeps.** A [deployment](/docs/capabilities/deployments) fires a fresh [session](/docs/concepts/sessions) on a cron tick; its [computer](/docs/capabilities/computer) clones the repo, runs the tests, and summarizes overnight changes into org-scoped [Files](/docs/capabilities/files).

```bash theme={"system"}
vetta deploy create --agent nightly-triage \
  --cron "0 9 * * *" \
  --budget-usd 5 \
  --window loose \
  --prompt "Summarize what changed in main overnight and open issues for regressions." \
  --on-idle https://acme.dev/hooks/vetta
```

Between fires, nothing is running — idle bills as storage. Each fire gets a fresh per-run [budget](/docs/concepts/budgets); a run that would exceed the cap goes idle with `stop_reason: "budget_paused"`, still reporting what it completed. The `on_idle` [webhook](/docs/capabilities/webhooks) pushes the result to you, and the published report stays in [Files](/docs/capabilities/files) long after the fire.

## A long report job on the cheap lane

**A data-crunching run that takes hours and nobody is watching.** An agent that delivers at nine has no reason to pay the `immediate` tariff — create the session with `--window loose`: same model, lowest price.

```bash theme={"system"}
SID=$(vetta session create \
  --agent report-writer \
  --window loose \
  --message "Pull the raw exports, aggregate the month, and publish the report as a file." \
  | jq -r .id)

vetta session stream --session "$SID"
```

The [event stream](/docs/concepts/events-and-streaming) is keyed by sequence number, so it survives you: close your laptop, come back hours later, resume with `--after-seq` — no gaps, no duplicates. The [durable runtime](/docs/concepts/runtime) never depended on your connection anyway: wake, turn, commit, sleep. Send follow-up turns with `vetta session send`; the finished report lands in [Files](/docs/capabilities/files) as a durable artifact.

## An always-reachable ops agent

**An agent that costs storage while it waits, and acts when the world calls.** An ops agent holds an [identity](/docs/capabilities/identity) — `ops@acme.com` and a phone number. A customer texts the number; the SMS is carrier-verified and stored on the identity's message feed. Your pager bot (or a person) starts a session from the stored message; the agent reads it, checks the runbook [skill](/docs/capabilities/skills), acts through its [connections](/docs/identity/connections) under [policy](/docs/concepts/policies), and replies as the identity — then sleeps at storage cost until the next call.

```bash theme={"system"}
vetta identity create --name "Acme Ops" \
  --domain acme.com --email ops@acme.com --phone +1...
vetta identity attach --agent ops-agent --identity "Acme Ops"

# a stored inbound message arrives → start a session from it
vetta session create --agent ops-agent --identity "Acme Ops" \
  --message "Handle the inbound SMS from +1555… on the Acme Ops feed."
```

The automatic **wake** — the stored inbound message starting the turn itself — is coming soon; outbound [webhooks](/docs/capabilities/webhooks) (`session.idle`, `message.completed`, `budget.exceeded`) are live for pushing results back to your systems.

<Card title="Next: quickstart" icon="rocket" href="/docs/quickstart">
  Create an agent, run it, and read the meter in under five minutes.
</Card>
