DocsSchedules and triggers
Features

Schedules and triggers

Schedules, shortcuts and triggers can start work without a new email. The results still arrive in your inbox.

Schedules, shortcuts, triggers and the daily summary start work without a new email. Each one creates an ordinary task. Its result, replies, branch and approvals work the same as they do for a task you send.

Schedules

Add when to run the task to the subject, and the email becomes a schedule. Each run starts a fresh task, and its result arrives in the same thread. Reply run now, unschedule or resume in that thread. Send an email with the subject schedules to list the schedules.

You create a schedule with when-words in the subject or with atgent schedule add. Times use your computer's local time. A schedule without a time runs at 9:00. tomorrow, a weekday name and in 2h run once; daily, weekdays, weekends, a plural weekday such as mondays, every monday and every 6h repeat.

codex website weekdays 9am
claude daily 7:30 readonly
codex every monday 8am
codex in 2h
atgent schedule add "codex website weekdays 9am" "Check last night's failed builds and fix them."
atgent schedule list

Shortcuts

A shortcut saves subject words and an instruction under one name. Reply save as review in a task thread to save that task's settings and first instruction, or run atgent shortcut add. Then send an email with the subject review. Add more words after the name to change a setting. Text in the body follows the saved instruction.

You can also store shortcuts in the config. Shortcuts saved with atgent shortcut add or a save as NAME reply remain in the local queue and work without a restart.

atgent shortcut add review "claude opus readonly" --prompt "Review the latest changes and list the risks."

Triggers

Triggers start tasks from other tools, and results return to the same inbox. A github_ci trigger starts one task for each failed GitHub Actions run and includes the failed log. A github_issues trigger starts one task for each open issue with a label. Both triggers use gh on your computer and start only for runs and issues that appear after setup. A webhook trigger listens only on 127.0.0.1 and requires the token from atgent trigger token.

Add triggers to the config and restart the runner. subject uses the same words as an email subject; without an agent word, the default agent runs. prompt replaces the default instruction. Event details follow prompt and are marked as data from another tool. GitHub triggers poll every 5 minutes unless every specifies otherwise, and the first poll records only what already exists.

"triggers": [
  {"name": "ci", "type": "github_ci", "project": "website", "subject": "codex high", "branches": ["main"]},
  {"name": "bugs", "type": "github_issues", "project": "website", "label": "atgent", "subject": "claude"},
  {"name": "deploy", "type": "webhook", "project": "website", "subject": "claude"}
]

The webhook listens on 127.0.0.1 at webhook_port, which defaults to 8787. It accepts at most 20 tasks per trigger per hour. Print the token with atgent trigger token. Start a trigger by hand with atgent trigger fire NAME.

Daily summary

Run atgent summary at 8am to turn on a daily summary email. The summary lists what ran, what is waiting on you, what failed in the last 24 hours, and the schedules coming up. Send an email with the subject summary to receive a summary at any time.

atgent summary at 8am turns on the daily summary. atgent summary off turns it off. atgent summary show prints it in the terminal. The runner sends one summary email per day at its first check after that time.

Checked against atgent 0.4.4.