Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions generated/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,27 +341,35 @@
},
"/plural-features/workbenches": {
"relPath": "/plural-features/workbenches/index.md",
"lastmod": "2026-05-27T21:33:58.000Z"
"lastmod": "2026-07-31T10:05:04.000Z"
},
"/plural-features/workbenches/configuration": {
"relPath": "/plural-features/workbenches/configuration.md",
"lastmod": "2026-05-27T21:33:58.000Z"
"lastmod": "2026-07-31T10:05:04.000Z"
},
"/plural-features/workbenches/coding-agent": {
"relPath": "/plural-features/workbenches/coding-agent.md",
"lastmod": "2026-05-27T21:33:58.000Z"
},
"/plural-features/workbenches/tools": {
"relPath": "/plural-features/workbenches/tools.md",
"lastmod": "2026-05-27T21:33:58.000Z"
"lastmod": "2026-07-31T10:05:04.000Z"
},
"/plural-features/workbenches/tools/datadog": {
"relPath": "/plural-features/workbenches/tools/datadog.md",
"lastmod": "2026-07-31T10:05:04.000Z"
},
"/plural-features/workbenches/running-jobs": {
"relPath": "/plural-features/workbenches/running-jobs.md",
"lastmod": "2026-05-27T21:33:58.000Z"
"lastmod": "2026-07-31T10:05:04.000Z"
},
"/plural-features/workbenches/automation": {
"relPath": "/plural-features/workbenches/automation.md",
"lastmod": "2026-05-27T21:33:58.000Z"
"lastmod": "2026-07-30T14:01:51.000Z"
},
"/plural-features/workbenches/follow-up-automation": {
"relPath": "/plural-features/workbenches/follow-up-automation.md",
"lastmod": "2026-07-30T15:19:23.000Z"
},
"/plural-features/workbenches/use-cases": {
"relPath": "/plural-features/workbenches/use-cases.md",
Expand Down
13 changes: 11 additions & 2 deletions pages/plural-features/workbenches/automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ description: Trigger workbench runs on a schedule, from incidents, or from ticke

## Overview

Workbenches can run jobs automatically through two mechanisms:
Workbenches can run jobs automatically through several mechanisms:

* **Cron schedules** — run a prompt on a recurring schedule
* **Webhook triggers** — fire a job when an observability alert or issue tracker event matches a pattern, including when someone writes `Plural fix this` on a PR or ticket
* **Post-merge follow-ups** — ask the workbench associated with a merged pull request to verify the reconciled system state

Both are managed from the overflow menu (**•••**) on a workbench.
Cron schedules and webhook triggers are managed from the overflow menu (**•••**) on a workbench. Follow-up prompts are configured in your source control or CI automation.

---

Expand Down Expand Up @@ -105,6 +106,14 @@ Each webhook source has its own setup guide available during trigger creation. C

---

## Post-merge follow-up jobs

When a workbench opens a pull request, a GitHub Actions workflow can send a follow-up prompt after the pull request merges and GitOps reconciliation completes. This lets the same workbench verify the live system or infrastructure state and address issues that are not visible from the source diff alone.

See [Automating workbench follow-up](/plural-features/workbenches/follow-up-automation) for provider-specific setup. The current guide includes authentication, inputs, and a complete GitHub Actions workflow.

---

## Flow-triggered jobs

Workbenches can also be triggered from a [Plural Flow](/plural-features/flows). On the flow detail page, click **Start workbench job** to select a workbench and enter a prompt. The resulting job is scoped to the flow's services and pipelines, giving the agent the right context for that application boundary.
Expand Down
2 changes: 1 addition & 1 deletion pages/plural-features/workbenches/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Attach only the tools this specific workbench needs. A tightly-scoped tool list

## Running your first job

Once the workbench is created, open it from the **Workbenches** list and type a prompt into the input field at the top of the **Jobs** tab.
Once the workbench is created, open it from the **Workbenches** list and type a prompt into the input field on the **Launch** tab.

A few prompts to start with:

Expand Down
171 changes: 171 additions & 0 deletions pages/plural-features/workbenches/follow-up-automation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
---
title: Automating workbench follow-up
description: Send a follow-up prompt after a pull request merges, deployment completes, and GitOps reconciliation settles
---

## Overview

Follow-up automation lets the workbench associated with a pull request verify changes after they merge, build, and deploy. The workbench can inspect the live system and infrastructure state, then report or fix issues that are only visible after deployment.

The automation method depends on your source control and CI provider. The following section documents GitHub Actions.

## GitHub Actions

The [Plural Workbench Follow-up Action](https://github.com/pluralsh/workbench-followup-action) sends a follow-up prompt to the workbench job associated with a merged pull request. It wraps the `plural workbenches pr-followup` command.

{% callout severity="info" %}
Run the action only for merged pull requests. The action does not check the pull request state itself.
{% /callout %}

### Requirements

The workflow requires:

* A GitHub Actions runner with Bash, Git, and `jq`
* `pluralsh/setup-plural@v2` run earlier in the same job with Plural CLI version `0.12.60` or newer
* Access to the target Plural Console through federated credentials or a Console token
* A workbench job associated with the pull request

### Configure the workflow

A common pattern is to run the follow-up after the same workflow builds the image, deploys the application, and then gives GitOps reconciliation time to settle before asking the workbench to verify the live result:

```yaml
name: Build, deploy, and verify merged changes

on:
pull_request:
types: [closed]

permissions:
contents: read
id-token: write

jobs:
deploy-and-follow-up:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build Docker image
run: |
docker build -t ghcr.io/acme/example:${{ github.sha }} .
docker push ghcr.io/acme/example:${{ github.sha }}

- name: Deploy application
run: ./scripts/deploy.sh ghcr.io/acme/example:${{ github.sha }}

- name: Set up Plural
uses: pluralsh/setup-plural@v2
with:
consoleUrl: ${{ vars.PLURAL_CONSOLE_URL }}
email: ${{ vars.PLURAL_CONSOLE_EMAIL }}
vsn: 0.12.60

- name: Verify deployed changes
id: follow-up
uses: pluralsh/workbench-followup-action@v1
with:
prompt: |
Pull request #${{ github.event.pull_request.number }} was merged into ${{ github.event.pull_request.base.ref }}.
The Docker image was built and the application was deployed.
Verify the live deployment, confirm the expected change is working, and fix any issues you find.
url: ${{ github.event.pull_request.html_url }}
defer: 5m
skip-missing: true

- name: Print Workbench job
if: steps.follow-up.outputs.skipped != 'true'
run: echo '${{ steps.follow-up.outputs.workbench-job-url }}'
```

Replace the example build and deploy commands with your own pipeline steps. Adjust `defer` to match the time your deployment normally needs to finish reconciling. `skip-missing: true` lets the workflow succeed when the pull request is not associated with a workbench job.

When `url` and `commit` are omitted, the action uses `github.event.pull_request.html_url`, so the explicit `url` input above is optional for a `pull_request` workflow.

### Authentication

`pluralsh/setup-plural` installs the selected CLI version and exports `PLURAL_CONSOLE_URL` and `PLURAL_CONSOLE_TOKEN` to subsequent steps in the job. Configure it with one of the following authentication methods.

#### Federated credentials

Use `consoleUrl` and `email` with a matching Plural federated credential. The workflow must grant `id-token: write` so `setup-plural` can exchange the GitHub OIDC token for a Console access token:

```yaml
permissions:
contents: read
id-token: write

steps:
- name: Set up Plural
uses: pluralsh/setup-plural@v2
with:
consoleUrl: ${{ vars.PLURAL_CONSOLE_URL }}
email: ${{ vars.PLURAL_CONSOLE_EMAIL }}
vsn: 0.12.60
```

#### Console token

Alternatively, store a Console token as a GitHub Actions secret. This method does not require the OIDC permission:

```yaml
permissions:
contents: read

steps:
- name: Set up Plural
uses: pluralsh/setup-plural@v2
with:
consoleUrl: ${{ vars.PLURAL_CONSOLE_URL }}
consoleToken: ${{ secrets.PLURAL_CONSOLE_TOKEN }}
vsn: 0.12.60
```

The follow-up action reads authentication from the environment and does not accept the Console URL or token as inputs.

### Inputs

| Input | Required | Default | Description |
|---|---|---|---|
| `prompt` | Yes | — | Follow-up prompt sent to the workbench. |
| `url` | No | Event PR URL | Explicit merged pull request URL. When omitted without `commit`, the action uses `github.event.pull_request.html_url`. |
| `commit` | No | `HEAD` | Commit or ref whose subject identifies the pull request when the URL is omitted. |
| `base-url` | No | Origin web URL | Repository web URL used to construct the pull request URL. |
| `provider` | No | `auto` | Source control provider: `auto`, `github`, `gitlab`, or `bitbucket`. |
| `defer` | No | `0s` | Duration to defer the follow-up, such as `30s`, `5m`, or `2h`. |
| `output` | No | `json` | CLI output format: `raw` or `json`. Structured action outputs are available only with `json`. |
| `skip-missing` | No | `false` | Exit successfully if no workbench job is associated with the pull request. |

`url` and `commit` are mutually exclusive.

### Outputs

| Output | Description |
|---|---|
| `prompt-id` | ID of the created follow-up prompt. Empty when skipped. |
| `pull-request-url` | Pull request URL used by the command. |
| `workbench-job-url` | URL of the associated workbench job. Empty when skipped. |
| `skipped` | `true` when no associated workbench job was found and `skip-missing` was enabled. |

The action populates structured outputs only when `output` is `json`. With `output: raw`, it writes the human-readable CLI result to the workflow log and leaves these outputs empty.

### Resolve a pull request from a commit

For a workflow triggered by a push to the deployment branch, the action can infer the pull request from the checked-out commit subject. Check out the repository with full history first:

```yaml
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Verify merged changes
uses: pluralsh/workbench-followup-action@v1
with:
prompt: Verify the merged changes against the reconciled system and infrastructure state.
commit: HEAD
provider: github
```

Use `base-url` with `provider` if the Git remote does not provide the correct repository web URL, such as for a self-hosted source control provider.
2 changes: 1 addition & 1 deletion pages/plural-features/workbenches/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ Workbenches live under a **project**, inheriting and extending that project's RB
1. Navigate to **Workbenches** in the Plural Console sidebar.
2. Click **Create workbench** and step through the [creation wizard](/plural-features/workbenches/configuration).
3. (Optional) Set up shared [tools](/plural-features/workbenches/tools) your workbench can call.
4. Run your first job from the workbench's **Jobs** tab.
4. Run your first job from the workbench's **Launch** tab.

Once you have a job running, you can layer in [automation](/plural-features/workbenches/automation) to trigger jobs on a schedule or from incidents.
2 changes: 1 addition & 1 deletion pages/plural-features/workbenches/running-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Jobs can be started manually from the UI, by a [cron schedule](/plural-features/

## Starting a job manually

Open a workbench and click **Start job** (or the prompt input at the top of the **Jobs** tab). Type your prompt and press **Run**.
Open a workbench, select the **Launch** tab, and type your prompt into the new-job input. Submit the prompt to start the job.

![](/assets/workbenches/workbench-start-job.png)

Expand Down
2 changes: 1 addition & 1 deletion pages/plural-features/workbenches/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ All native integrations respect your existing RBAC — enabling a capability her
| Tool | What the agent can do |
|---|---|
| **Prometheus** | Query metrics from a Prometheus-compatible endpoint |
| **Datadog** | Query metrics and logs from the Datadog API |
| **[Datadog](/plural-features/workbenches/tools/datadog)** | Query metrics, logs, and traces from the Datadog API |
| **Loki** | Query log streams from a Loki-compatible endpoint |
| **Elastic** | Query and search indices in an Elasticsearch cluster |
| **Tempo** | Query distributed traces from a Grafana Tempo endpoint |
Expand Down
Loading
Loading