# Automations

> Standing agents that wake on a schedule or an event, maintain living documents, and route decisions to you.

Most agents run because you sent a message. An **automation** runs because something happened. It's a standing agent: a role, the events it watches, and the documents it maintains. It carries no stored goal — what it does lives in its role; the configuration only says *when* it wakes and *what* it reads and writes.

## What wakes a run

| Trigger | Example |
| ------- | ------- |
| **Event** | A thread commits, a PR merges, CI fails, or an external webhook arrives — via [the event spine](https://darting.dev/docs/event-spine/). |
| **Schedule** | A weekly pass, a nightly sweep. |
| **Manual** | You click **Run now**. |

## What a run produces

A run reads its corpus, figures out what changed since last time, and writes **document collections** — its durable memory and its output ([Collections & history](https://darting.dev/docs/collections-and-history/)). Some collections are **active on write**; others are **proposed** and wait for your yes in the [Inbox](https://darting.dev/docs/inbox-and-proposals/). State lives in those documents, not in a conversation, so a loop can pick up days later exactly where it left off.

## Built in: Organizer, Knowledge, and Skills

Every project ships with standing loops for its own memory: the **Organizer** (rebuilds the [Knowledgebase](https://darting.dev/docs/knowledgebase/) daily — on by default, since it only organizes and proposes), **Knowledge sync** (keeps the [knowledge base](https://darting.dev/docs/structured-memory/) current — opt-in), and **Skills** (a weekly pass over your [skills](https://darting.dev/docs/rules-and-skills/) — opt-in). [Built-in loops](https://darting.dev/docs/built-in-automations/) covers each in detail.

## Beyond code

The same machine isn't limited to coding. A project becomes a graph of standing loops — and they're all the same engine with different wiring:

- A **changelog writer** that tells the story of every merged PR
- A **docs-freshness** loop that opens fix PRs when the code drifts from the docs
- An **error triage** loop fed by a Sentry webhook
- A **feedback synthesizer** that clusters customer themes
- A **social drafter** that drafts posts when you ship — and waits in your Inbox

## Guardrails

Automations run unattended, so they're bounded:

- **Budgets** — a per-run token cap and a max-runs-per-day; a run that hits the cap finishes gracefully and resumes on its next trigger.
- **Risk gating** — mechanical, reversible work can auto-fix and merge on green CI; anything needing judgment is proposed and waits for you.
- **Untrusted input** — external content (webhook payloads, fetched pages) is treated as data to summarize, never as instructions to follow.

## Where you watch them

A **Dashboard** shows each loop's health and spend. The [Inbox](https://darting.dev/docs/inbox-and-proposals/) is one queue of everything waiting on you — proposed documents, failed runs, stuck PRs. The **Library** is the whole corpus, browsable across every collection.

Ready to wire one up? Start with [building your own](https://darting.dev/docs/custom-automations/).
