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

# Automations

> Put agents to work on a schedule or a trigger — so the report, the analysis, or the alert happens without you.

Agents don't only work while you watch. Under **Activity** you can set up
**automations**: an agent that runs on its own and does the work, then leaves the
result (or a notification) for you.

## What you can automate

* **Run an agent** — invoke an agent with a set task, optionally with specific
  [datasets](/data) and [skills](/knowledge) attached.
* **Start a conversation** — create a fresh [conversation](/concepts#conversations) and message an
  agent, so the work shows up as a conversation you can pick up.
* **Refresh data** — keep a connected [dataset](/data) up to date on a schedule.

## Agent or script

An automation runs one of two ways, and Erdo picks the cheaper one that does the
job:

* **Agent** — an AI runs each tick, following your instructions. Use it for work
  that needs judgement every time: interpreting an anomaly, weighing several
  metrics, writing a digest someone reads.
* **Script** — a deterministic check runs each tick with no AI at all. Use it for
  mechanical work: comparing a number to a threshold, noticing new rows,
  emailing a templated alert. A script costs nothing to run, so it can fire the
  moment data lands rather than waking an AI on a timer to look.

Both follow the same schedule, the same approval rules, and leave the same
history. When you ask for "email me when a new lead comes in", Erdo builds the
script kind — it's the same alert an agent would send, without the per-run cost.

## Triggers

* **Schedule** — run on a recurring cadence (e.g. every morning, every Monday).
* **Webhook** — run when an external system POSTs to the automation's URL; the
  payload is handed to the agent.

## Notification emails

When an automation emails you — a new lead landed, a threshold was crossed, a
weekly summary is ready — Erdo composes the message rather than the automation
writing raw markup. You get the same styling as every other Erdo email: a
heading, the facts as label/value rows, a button through to the page or
dashboard the alert is about, and addresses and links that are clickable, so you
can reply to a lead straight from the notification. Every message also carries a
plain-text version, so it stays readable in a client that blocks HTML and in a
forwarded copy.

This holds however the alert is built. Erdo will often set an alert up as a
small deterministic script — it fires the moment the data lands and costs
nothing to run, unlike an agent waking on a timer to check — and those scripted
alerts are styled exactly like the ones an agent sends.

When the same kind of email goes out from several places — one lead alert across
a handful of campaigns, say — Erdo can save it as a reusable **template** in your
[Knowledge](/knowledge): the layout is written once, with placeholders for the
details, and each send fills in the data. Editing the template updates every
automation that uses it, and the values are still escaped and given a plain-text
version automatically, so a template is as safe as a one-off message.

## Editing an automation

Change an automation in place without recreating it — rename it, move its
schedule, pause it, or replace what it does (an agent automation's instructions,
a scripted one's body). Its history and its place in your workspace carry over.
From the terminal:

```bash theme={null}
erdo automations update <id> --interval 30
erdo automations update <id> --script-file alert.js
```

The same edit is available over the API and MCP (`erdo_update_heartbeat`), and in
the app.

## Keep an eye on things

Everything an automation does is visible under **Activity**:

* **Runs** — the execution history, with status, timing, and any errors.
* **Feed** — a live log of what's happening across your workspace: agent runs,
  data refreshes, approvals, and new [knowledge](/knowledge).

## You're still in control

Automated runs follow the same rules as interactive ones: consequential actions
still go through [approval](/concepts#review-and-approvals), and new knowledge
still lands in **Review**. An automation can do the work unattended without being
able to act outside the bounds you've set.
