Run Agents on a Schedule and from Slack
In chapter 5 of Build Your First Agent, a GitHub event starts the PR Review agent. In this track, you start agents in the two other ways. First, you build a Stale PR Digest agent and run it every week, and one time at a set time. Then, you let people start the PR Review agent from a Slack message. The track takes about 45 minutes.
| Page | You do | You learn |
|---|---|---|
| 1. Run an agent on a schedule | Build a digest of stale pull requests. Run it every Monday, and one time a few minutes from now. Pause it and read its firings. | cron and once triggers, time zones, limits, run.branch and run.commit, and firings |
| 2. Start an agent from Slack | Start the PR Review agent when someone mentions Autoheal with a pull request link. Test the trigger with a sample event. | slack.app_mention and slack.message triggers, Slack event fields in with, filters, and how the reply gets to Slack |
Before you start
- Do the Quick Start, Build Your First Agent chapters 1 to 3, and steps 1 and 3 of chapter 4. The agent must clone the repository and have the read-only tool filters. These steps need no GitHub Integration Connection. You need the
pr-reviewagent for page 2. - Page 1 needs only a browser. The digest agent reads a public GitHub repository, so you do not need a GitHub Integration Connection.
- Page 2 needs a Slack Integration Connection in your organization, and a channel that Autoheal is a member of. See Slack. Without Slack, you can still do steps 1 to 3 of page 2 with a sample event.
- To create triggers, you need permission to create triggers in the project. A Member and a Project Admin have it.
Each page shows the steps in the web app. The CLI steps are at the end of each page.