mcpField
P
polylane-automations

polylane-automations

github.com/coreplanelabsAgent workflows146 installsUpdated 3w ago
Repository

About polylane-automations

Polylane Automations describes how to configure unattended agent runs using declarative JSON. It is for teams automating event-driven investigation and follow-up, with configurable triggers, tools, actions, and result destinations.

Key features

  1. 01Configure event triggers and optional delays
  2. 02Specify agent instructions and Polylane skills
  3. 03Apply actions such as issue creation or rollback
  4. 04Deliver results by email, Slack, or webhook
  5. 05Inspect run transcripts and execution states
  6. 06Create automations from templates or custom JSON

Use cases

  1. 01Investigate filtered alerts and open issues
  2. 02Run scheduled or webhook-triggered agent tasks
  3. 03Route noteworthy results to a team destination
  4. 04Test and refine an automation through manual runs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/coreplanelabs/skills --skill polylane-automations

After installing, type/polylane-automationsin Claude Code to confirm it loaded.

Details

From the project README

Polylane Automations

An automation is an unattended agent run: a typed event fires, an agent executes your instructions with an allowed set of skills (tools), optional actions apply side-effects, and destinations deliver the result. Every piece is declarative JSON.

This file carries the model and the authoring process — not the type catalogs, which have live sources:

SourceHow to retrieveUse for
API schemapolylane api describe automations.postThe authoritative request shape, every trigger/action/destination type and filter, for the installed API version
Public catalogsGET /v1/public/automations/{catalog,triggers/catalog,actions/catalog}Templates and type lists without auth
Docshttps://docs.polylane.com/remediation/automations (+ /triggers, /actions, /destinations, /templates; raw markdown at /raw/...md)Concepts, examples, filter semantics
Template shapespolylane automation catalog --output jsonFull bodies to crib from
Attachable skillspolylane skill listSlugs for --tool

The Shape

trigger(s) ──▶ [optional delay] ──▶ agent run (instructions + tools) ──▶ actions ──▶ destinations
  • Triggers — typed events: alert, cron, webhook, github.*, <provider>.deployment, slack.message, polylane.* (issue.triaged, change_record.created, …). Platform triggers (cron, webhook, polylane.*) always work; provider triggers need the matching integration connected.
  • Instructions — a plain-English job description the agent executes.
  • Tools — Polylane skills (by slug) the agent may load during the run.
  • Actions — side-effects the agent may apply: open issues, comment/merge/submit PRs, roll back deployments, queue autofixes, hand off to external coding agents.
  • Destinations — where the result is delivered: email, slack, webhook.

Modes gate actions and destinations alike: always fires on every completed run; smart only when the run is judged noteworthy — except failures, which always deliver to destinations. Prefer smart for high-impact actions (merges, rollbacks).

Every run is a thread — the full transcript is inspectable. Execution states: pending → delayed → running → completed / failed / skipped.

Constraints Worth Knowing

  • Up to 10 triggers per automation; each type at most once — except cron and webhook, which can repeat.
  • openIssue respects the workspace's daily issue limit; plan-limit rejections are HTTP 426.
  • Slack destinations need the Slack integration; webhook destinations time out after 10 s, and non-2xx records the delivery as failed.
  • Rollback actions and their strategies are provider-specific — check api describe for the exact strategy names before writing one.

Template or Custom?

├─ A catalog entry matches as-is → polylane automation from-template <slug>
├─ Close but too broad → crib its body (catalog --output json), narrow the trigger, create custom
└─ Nothing matches → polylane automation create (flags or --body-file)

Instantiated templates become fully editable automations.

CLI Surface

polylane automation catalog                        # browse templates
polylane automation from-template <slug>           # instantiate
polylane automation create \
  --name "Triage Datadog alerts" \
  --trigger '{"type":"alert","filters":{"sources":["datadog"],"severities":["critical"]}}' \
  --instructions "Correlate the alert with recent deploys and open an issue with the findings." \
  --tool investigate-errors \
  --action '{"type":"openIssue","mode":"smart","defaultSeverity":"high"}' \
  --delay 600000                                   # let a deploy settle before judging it

polylane automation trigger <id>                   # manual run
polylane automation executions <id>                # then: execution <id> <execution-id>, rerun

--trigger / --action / --destination take JSON (repeatable), or a bare type for filterless ones (--trigger webhook). --tool attaches a skill by slug (repeatable). --body-file passes a full JSON body (- = stdin); flags layer on top. Every flag: polylane automation create --help.

Authoring Checklist

Work through every item; the automation is done when a manual run has produced the intended outcome.

  1. Catalog first — only go custom when nothing fits.
  2. Scope the trigger — filter by environment, source, severity, or repository; an unfiltered trigger runs on everything. Prefer polylane.issue.triaged over raw alert when the automation should act only on confirmed problems.
  3. Instructions read like a runbook — what to investigate, what evidence to gather, what a good outcome looks like.
  4. Attach only the skills the job needs.
  5. Gate risky actions with smart mode, and add a --delay on deploy-adjacent triggers.
  6. Wire a destination — results nobody sees are results nobody acts on.
  7. Test with a manual run — automation trigger, inspect the execution's thread, iterate on the instructions until the run does what the user asked.

Comments

Markdown supported