> ## 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 Naive Managed Agents.

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](https://vetta.sh/docs/capabilities/deployments.md) fires a fresh [session](https://vetta.sh/docs/concepts/sessions.md) on a cron tick; its [computer](https://vetta.sh/docs/capabilities/computer.md) clones the repo, runs the tests, and summarizes overnight changes into org-scoped [Files](https://vetta.sh/docs/capabilities/files.md).

```bash theme={"system"}
vetta deploy create --agent agt_01j8rk2vq6m4zx9kp7n3c5hwae \
  --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](https://vetta.sh/docs/concepts/budgets.md); a run that would exceed the cap goes idle with `stop_reason: "budget_paused"`, still reporting what it completed. The `on_idle` [webhook](https://vetta.sh/docs/capabilities/webhooks.md) pushes the result to you, and the published report stays in [Files](https://vetta.sh/docs/capabilities/files.md) 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 agt_01j8rp3vk7m2zq9xn4c6h5wtdb \
  --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](https://vetta.sh/docs/concepts/events-and-streaming.md) 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](https://vetta.sh/docs/concepts/runtime.md) never depended on your connection anyway: wake, turn, commit, sleep. Send follow-up turns with `vetta session send`; the finished report lands in [Files](https://vetta.sh/docs/capabilities/files.md) 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](https://vetta.sh/docs/capabilities/identity.md) — `ops@acme.com` and a phone number. A customer emails `ops@acme.com`; the mail passes SPF/DKIM/DMARC, is stored on the identity's message feed, and wakes the agent that owns the inbox. The agent reads it, checks the runbook [skill](https://vetta.sh/docs/capabilities/skills.md), acts through its [connections](https://vetta.sh/docs/identity/connections.md) under [policy](https://vetta.sh/docs/concepts/policies.md), and answers with `email.send` from that inbox once you approve (or its policy allows it) — then sleeps at storage cost until the next call. A text to the number wakes the agent the same way, but it cannot answer one: no agent tool sends a text yet.

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

# texts to the number now wake ops-agent, as "Acme Ops"
vetta identity phone update --identity "Acme Ops" --phone pho_... --agent agt_...
```

The **wake** is automatic and guarded against floods and reply loops ([Inbound events](https://vetta.sh/docs/identity/inbound.md)); outbound [webhooks](https://vetta.sh/docs/capabilities/webhooks.md) (`session.idle`, `message.completed`, `budget.exceeded`) are live for pushing results back to your systems.

> [card] [Next: quickstart](https://vetta.sh/docs/quickstart.md)
>
> Create an agent, run it, and read the meter in under five minutes.


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