Skip to main content
A trigger binding connects an external event to an agent run. This guide sets up a GitHub webhook, but the same shape works for a generic webhook from any system.

Prerequisites

  • An agent that runs correctly on its own. Test with jstm agent run first.
  • Permission to add a webhook in the source system.
1

Create the binding

For the github provider, --event, --org, and --repo build the trigger source for you. Omit --repo for an org-wide binding. --mode is required: start with simulation while you check the mapping. The trigger is pinned to the agent’s latest version unless you pass --version.
--webhook-secret - reads the secret from stdin, keeping it out of your shell history. To reuse a secret you already store:
For a non-GitHub source, use --provider generic_webhook and set --trigger-source yourself. The endpoint accepts a CloudEvents 1.0 body or plain JSON. If the sender supports Standard Webhooks signing, add --auth-scheme standard_webhooks and omit --webhook-secret; the server generates the secret and prints it once.
2

Get the webhook URL

Paste this into the source system’s webhook settings, along with the same secret you set.
3

Send a signed test

The server resolves the vault credential and signs with the real HMAC secret, so this exercises the true signature path rather than a mock. No secret leaves the backend.
4

Confirm it landed

Events show what arrived and what the platform did with it. This is where to look when a webhook fired but no run started. A delivery that repeats an earlier CloudEvent id is recorded as a duplicate, and one over the binding’s rate limit as rate_limited; neither starts a run.Then check the run itself:

Mapping event data into the run

Use --input-mapping to shape the incoming payload into the agent’s input:
The @file form keeps a long mapping out of the command line.

Turning a trigger off

Disable rather than delete when the pause is temporary. The binding, its secret, and its event history survive:
To remove it for good:

Choosing the mode and version

Every trigger has its own mode and is pinned to one version, both chosen when you create it (--mode simulation|run, --version). Start in Simulation while you confirm the mapping is right — the webhook fires end to end, but nothing takes effect — then switch:
A new build does not move the trigger. When the new version is ready, re-pin it with jstm trigger update 3f21b8c0-5d7e-4a91-b2c6-8e0f4d1a9b37 --version 0.0.4.

See also