Overview
An automation runs an agent in response to an event. You describe the job; Polylane assembles the configuration and executes it on every match.
The model
An automation has four parts:
- Triggers: the events that start a run. A provider alert, a GitHub event, a deployment, a Slack message, a cron schedule, a webhook, or a platform event such as
polylane.change_record.created. An automation can have up to 10 triggers. - Instructions: the plain-English brief the agent follows on every run.
- Actions: what the agent is allowed to do. Submit a pull request, merge one, comment on a pull request or an issue, create a GitHub issue, open a Polylane issue and start its investigation, roll back a deployment, run an autofix, or hand off to an external coding agent. Each action runs in
alwaysmode on every run or insmartmode only when the run found something noteworthy. - Destinations: where results go when a run completes. Email, Slack, or a webhook. Destinations also support
alwaysandsmartmodes.
You can also attach skills so the agent runs your packaged workflows.
Building one
Four ways to create an automation:
- Plain English. Describe the job. Polylane opens a builder session: an agent drafts the triggers, instructions, actions, and destinations, and you refine the draft by chatting before you save it.
- Templates. Start from the catalog and adjust.
- Manual builder. Configure each part by hand in the console.
- CLI or API. Define everything yourself.
A prompt that produces a working automation:
When a Datadog monitor crosses into alert state, pull the relevant
metrics and logs, summarize the likely cause, and open an issue.
The same job from the terminal:
polylane automation catalog
polylane automation from-template detect-anomalous-traffic
polylane automation create \
--name "Triage Datadog alerts" \
--trigger '{"type":"alert","filters":{"sources":["datadog"]}}' \
--instructions "Correlate the alert with recent deploys and open an issue with findings." \
--action '{"type":"openIssue","mode":"smart"}'
See the API reference for the equivalent endpoints.
Executions
Every run creates an execution. An execution runs one or more agent passes, and every pass is a thread: open it to read the full investigation, every tool call, and every artifact. The execution records the trigger event, the matched trigger, a summary, the duration, and whether the run was noteworthy. The noteworthy flag is what gates smart actions and destinations.
An execution moves through pending, delayed (when the automation sets a start delay), running, and ends completed, failed, or skipped.
polylane automation executions <automation-id>
polylane automation execution <automation-id> <execution-id>
polylane automation rerun <automation-id> <execution-id>
Recommended automations
After you connect a provider, Polylane recommends templates that fit it. Open the recommendations, keep the ones you want, and create them in one step.
cron, and webhook work in every workspace. See Triggers.Try it from your coding agent: