---
title: "Automations"
description: "Run saved agent prompts on a schedule, on events from GitHub, Slack, Linear, Sentry, PagerDuty, PostHog, Alertmanager, or webhooks, or on demand."
url: "https://www.thecompany.company/docs/agent/automations"
---

# Automations

> Run saved agent prompts on a schedule, on events from GitHub, Slack, Linear, Sentry, PagerDuty, PostHog, Alertmanager, or webhooks, or on demand.

Automations run a saved prompt in the background on a recurring schedule, in response to connected events, or manually on demand. Use an automation for repeatable workflows; for a one-off wait inside an active task, use a [session's background work](/docs/agent/sessions#background-states-and-notifications).

![The Automations list with saved automation names and states](https://www.thecompany.company/docs/screenshots/light/automations-list.webp)

Open an automation to edit its triggers, adjust its prompt, or inspect past runs.

## Getting started [#getting-started]

1. ### Create an automation [#create-an-automation]

   Open **Automations** in the sidebar and select **New automation**, or ask the agent in any session to set one up.
2. ### Add triggers [#add-triggers]

   Select **Add trigger → Schedule** for a recurring run or **Add trigger → Event** to react to a connected service or webhook. Leave triggers empty for a manual-only automation.
3. ### Write the prompt and choose a target [#write-the-prompt-and-choose-a-target]

   Describe what each run should inspect, decide, and produce, and choose whether it creates a fresh session (with your chosen model) or posts into an existing session.
4. ### Test with Run now [#test-with-run-now]

   Select **Run now** to test the prompt without waiting for a trigger, then inspect the result under **Runs**.

## Triggers [#triggers]

An automation can combine multiple triggers and fires whenever any matching trigger occurs.

### Scheduled triggers [#scheduled-triggers]

Run on a recurring cadence using a preset schedule or a custom cron expression (evaluated in UTC).

### GitHub triggers [#github-triggers]

React to repository activity from your connected [GitHub](/docs/integrations/github) integration—such as pull request updates, merges, reviews, or check completions—scoped to selected repositories.

### Slack triggers [#slack-triggers]

React to events your [Slack](/docs/integrations/slack) integration receives—mentions, direct messages, and handled threads—filtered to specific channels. Slack triggers only see events the integration receives, not every message in every workspace channel.

### Linear triggers [#linear-triggers]

React to issue events from your connected [Linear](/docs/integrations/linear) workspace, including delegating matching Linear issues directly to an agent.

### Monitoring and analytics triggers [#monitoring-and-analytics-triggers]

Trigger automated triage or summaries from **Sentry**, **PagerDuty**, **Alertmanager**, and **PostHog** events to investigate new errors, summarize incidents, or check regressions when alerts fire.

### Incoming webhooks [#incoming-webhooks]

Generate a private webhook URL to trigger an automation from your own services, CI pipelines, or internal tools. Treat the webhook URL and secret like credentials—if exposed, rotate them and update the sender.

### Filters and conditions [#filters-and-conditions]

Narrow any event trigger with structured filter conditions (exact match, substring or pattern match, or list membership) so runs start only when an event matches your criteria.

## Writing effective prompts [#writing-effective-prompts]

Write automation prompts the same way you brief a teammate on a recurring task:

- State the exact inputs to inspect and what to skip.
- Include clear decision rules for when to act, when to open a draft or PR, and when to do nothing.
- Define the output format and where results should stay (for example, keep a summary inside the workspace instead of posting externally).

> Every weekday morning, list open release-blocking PRs. Include the check or review each one is waiting on and link to the PR. Don't modify any PRs.

> When a pull request merges in the docs repository, summarize the user-facing changes in three bullets. Skip dependency-only updates. Keep the summary in this workspace.

## Runs, pausing, and guardrails [#runs-pausing-and-guardrails]

```mermaid
flowchart LR
  T["Schedule, event, or Run now"] --> P["Saved prompt runs"]
  P --> H["Runs: outcome and linked session"]
```

- **Inspect runs:** Open the **Runs** tab on any automation to check run status, timing, and open the linked session.
- **Pause without deleting:** Disable an automation to stop future triggers while keeping its prompt, triggers, and run history intact.
- **Built-in guardrails:** Automations enforce rate, concurrency, and queue limits so a burst of external events cannot run unchecked.
- **Manual tests vs. event filters:** **Run now** verifies your prompt end to end, but does not verify that a GitHub, Slack, or webhook payload matches your trigger filters.

## Next steps [#next-steps]

- [Sessions](https://www.thecompany.company/docs/agent/sessions.md): Inspect linked runs and steer active work in a session.
- [GitHub](https://www.thecompany.company/docs/integrations/github.md): Connect repositories for pull request and check triggers.
- [Slack](https://www.thecompany.company/docs/integrations/slack.md): Connect Slack for mentions, DMs, and channel triggers.
- [Linear](https://www.thecompany.company/docs/integrations/linear.md): Connect Linear to react to and delegate issues.
