Schedules and triggers

Run an agent on a schedule, or let another system start it with a signed webhook call.

By default an agent runs only when someone starts it. A schedule lets it run by itself at set times. A webhook trigger lets another system start it, for example when a new order comes in.

Schedules

Open the agent's Schedule tab and choose New schedule. The agent must be deployed and fully set up first. Schedules are part of Business and Enterprise; on Free New schedule is locked and explains why.

The full walk-through, what scheduled runs cost and what to check before you rely on them are on Scheduled agents and workflows.

Webhook triggers

A webhook trigger gives the agent its own URL. When another system calls it with a valid signature, AgentWorks starts a run and passes the request body to it as input. Creating and managing webhook triggers is for workspace admins and team managers.

  1. Add the trigger

    On a deployed agent, open the options menu (the three dots) at the top of the page and choose Add webhook trigger.

  2. Name it

    On New webhook trigger, give it a name, check that the agent is the target, and choose Create trigger.

  3. Copy the URL and secret

    You see the Webhook URL and the Signing secret once. Store the secret safely in the calling system: it is not shown again.

Signing a request

The calling system sends two headers with every request:

HeaderValue
X-Webhook-TimestampThe current time in Unix seconds.
X-Webhook-SignatureThe base64 HMAC-SHA256 of {timestamp}.{raw body}, keyed with the signing secret.

Sign the exact bytes you send as the body. Requests older than 5 minutes are refused, so a captured request cannot be replayed later. Send JSON; it becomes the run's input.

What comes back

StatusMeaning
202Accepted. The run starts in the background.
401The signature or timestamp is missing, wrong or too old.
402The balance or a spending limit does not allow the run.
404The trigger does not exist or is switched off.
429Too many calls in a minute. Queue on your side.

All triggers are listed on the Triggers page (find it with the search at the top of the app), where View fire history shows when each one fired. To change the secret, create a new trigger and switch the caller over.

A webhook run starts with nobody watching. It is paid from extra usage only, and an action that asks for approval waits for a person. See Scheduled agents and workflows.