Skip to content
Browse the docs

Automations

Run a Nested agent on a schedule or when something happens in GitHub, Slack, Sentry, or a webhook. Every run opens a task and lands in the automation’s history.

Updated 3 min readView as MarkdownOpen in Nested

Recurring and event-driven work should not depend on you remembering to open a thread. An automation is one named thing: When a trigger fires, the agent Does what you wrote, in a new task with the automation’s name. Every run lands in the automation’s History.

Before you start#

  • Have an agent you can assign. The agent picker lists your agents that accept tasks Only me; agents set to Anyone signed in cannot be picked. With none, the form shows Deploy an agent first. The agent does not need to be running to save.
  • Open Automations from the account menu (desktop) or the Automations tab (phone).
  • For GitHub or Slack triggers, connect the service on the Integrations card of the Automations page first. See GitHub and Slack bots.

Steps#

  1. Select New automation, or Start from a template to begin from a prepared form.
  2. Pick the Agent and enter a Name. Each run opens a task with this name.
  3. Under When, add one or more triggers (see the table below).
  4. Under Do, choose Instructions (markdown) or a Formula from the agent’s packs. The trigger’s event payload — for GitHub, the webhook JSON — is appended to instructions. For a formula, fill its Variables; a value you leave empty is filled from the trigger event when the formula declares a matching input.
  5. Set any optional settings (listed below).
  6. Select Save and turn on, or Save as paused to turn it on later.

Optional settings:

  • Session options apply to every task this automation starts. They appear once the agent is running.
  • Memory chooses which of your memories the runs use.
  • Mark task complete when the agent finishes — turn it on for digests and chores.
  • While it runs lets the agent read recent messages in one Slack channel.
  • When it finishes posts the agent’s final message to a Slack channel, or comments with Comment on the pull request when a pull request started the run.

Triggers#

TriggerWhat you setWhen it fires
ScheduleOn weekdays (Days, Time, optional Day of month; quick Every day or Weekdays) or On an interval (every N minutes, hours, or days), plus TimezoneOn the schedule. Schedules carry no payload.
GitHubOrganization, Repository, one or more When presets, optional Mentions, optional Acknowledge comments reactionOn matching repository events.
SlackSlack workspace, Channel (or Any channel), Events: App mention, New message in channel (optionally Only if the message contains a word), or Emoji reactionOn matching Slack events.
WebhookMethod and optional Path slugsWhen something calls the URL Nested shows after you save, with the one-time HMAC secret.
Run nowNothingOnly when you select Run now.
Provider (for example Sentry)The provider’s fields and Start when presetsOn the provider’s events. See Sentry.

Manage an automation#

On the automation’s page you can switch it On or Paused, select Run now, edit it, or Delete it (its history goes with it). History lists each run with its status (Running, Succeeded, Failed, Skipped), Open task or Open run, Repeat, and Payload to inspect the trigger data.

Example#

When a pull request opens in acme/app, run the code-review agent with the instructions “Review for bugs and comment only when you find something real.” Turn on Comment on the pull request. Nested starts a task per pull request, the agent comments, and each run appears in History with its payload.

Questions

Why can’t I pick my agent in an automation?
Automations can only use agents that accept tasks Only me. Agents set to Anyone signed in are not assignable.
Does the agent see the event that triggered it?
Yes. For instructions, the event payload is appended to your text. For a formula, empty variables are filled from the event. Schedules carry no payload.
Can one automation have several triggers?
Yes. Add more than one trigger under When; any of them starts a run.