quiet robot

Agent Playground

Triggers

Start an Agent Playground flow without pressing Run, on a schedule, from a webhook or when something happens in a GitHub repository.

View as Markdown

A trigger starts a saved flow by itself. Each start is a normal run, with the flow's limits, its policy and your plan's run limits, and it shows in Recent runs like any other.

TriggerStarts the flow
ScheduleEvery 15 or 30 minutes, hourly, daily or weekly.
WebhookWhen another app sends a POST to the flow's own address.
GitHubOn a push, a pull request or a release in a repository.

A flow can have up to 10 triggers, of any mix.

A nightly check: a schedule starts the flow, an agent fixes what fails, and a person approves the fix.Run tests (Run command), Fix the code (Agent), Open a pull request? (Approval), Open the pull request (Run command), All green (Output). Arrows: Run tests to Fix the code on Failed; Fix the code to Open a pull request? on Done; Open a pull request? to Open the pull request on Approved; Run tests to All green on Passed.FailedDoneApprovedPassed>_ RUN COMMANDRun testsDaily at 02:00 UTC◉ AGENTFix the code✋ APPROVALOpen a pull request?>_ RUN COMMANDOpen the pull request⚑ OUTPUTAll green
A nightly check: a schedule starts the flow, an agent fixes what fails, and a person approves the fix.

Add a trigger

Open Triggers in the builder's toolbar (on smaller screens, it's under More). You can also choose the Triggers chip above the flow's first step, or the Trigger block in the Blocks panel. Then choose Add trigger and pick a kind.

Each trigger in the list has an On/Off switch, says when it last started a run, and shows why if its last start didn't happen. Delete trigger removes it, and its address stops working at once.

Schedule

Pick how often: Every 15 minutes, Every 30 minutes, Every hour, Daily or Weekly. For daily and weekly, also pick the time and, for weekly, the day. Times are in UTC.

A schedule that was due while the service was busy for a few minutes still starts. A start that was missed by more than five minutes is skipped, not made up later, so a flow never starts twice in a row to catch up.

Webhook

A webhook gives the flow its own address. Anything that can send an HTTP POST can start it: a form, a monitoring alert, a Zapier or Make step, or your own code.

When you add one, the builder shows the address and a token, with a ready-made Try it command. The token is shown only once. Copy it then: we can't show it again. If you lose it, delete the trigger and add a new one.

Terminal
curl -X POST https://api.quietrobot.ai/api/v1/hooks/flows/trg_123 \
  -H "X-QR-Token: qrt_..." \
  -H "Content-Type: application/json" \
  -d '{"customer": "Acme", "ticket": 4821}'

The JSON body, up to 64 KB, is passed to the run (see What the run gets). The answer is 202 with the new run's runId. A wrong token or an unknown address gets 401, and a trigger that's turned off, or a run your limits don't allow right now, gets 409.

Careful

Anyone with the address and token can start the flow, and what they send reaches the run. Treat the token like a password, and keep an Approval before any step that does something real with what was sent.

GitHub

A GitHub trigger starts the flow on events in a repository:

EventWhen
pushCommits are pushed.
pull_requestA pull request is opened, reopened, updated with new commits, or marked ready for review.
releaseA release is published.

Pick the events, and optionally Only this repository (owner/name), then add the trigger. The builder shows a payload URL and a secret, shown only once. Then, in GitHub:

  1. In your repository, open Settings, then Webhooks, then Add webhook.
  2. Paste the payload URL, set the content type to application/json and paste the secret.
  3. Choose the same events, and save.

Every delivery is checked against the secret, so only GitHub can start the flow. Each delivery starts at most one run: a delivery sent again, including with GitHub's Redeliver, is ignored.

The run gets a short summary of the event (the repository, the branch or tag, the commit, pull request or release, and who did it), not the whole delivery.

What the run gets

Whatever started the run is passed to it:

  • In the sandbox, as the file .qr/trigger.json. A Run command or Run code step can read it, like jq .ticket .qr/trigger.json.
  • In AI steps, as {{trigger}}. In a prompt or an agent's goal, choose Insert… → What started the run.

A run started by hand or from the API has no trigger, so {{trigger}} is empty and the file isn't there.

A support form posts to a webhook: Claude sorts the message, and a person approves anything that moves money.Read the message (Run code), What kind? (AI choice), Refund this order? (Approval), File the bug (Run command), Draft an answer (Ask AI). Arrows: Read the message to What kind?; What kind? to Refund this order? on refund; What kind? to File the bug on bug; What kind? to Draft an answer on question.refundbugquestion{ } RUN CODERead the message.qr/trigger.json◆ AI CHOICEWhat kind?refund · bug · question✋ APPROVALRefund this order?>_ RUN COMMANDFile the bug✦ ASK AIDraft an answer
A support form posts to a webhook: Claude sorts the message, and a person approves anything that moves money.

Who a run belongs to

A triggered run starts as the person, or the API key, that added the trigger, with the same limits. If that key is revoked, has expired or has reached its spend cap, or that person has left your organization, the trigger starts nothing and says why in its list. Adding, deleting and every start are written to your audit log.

From code

Triggers have their own routes in the Flows API:

CallWhat it does
GET /flows/{id}/triggersA flow's triggers, with when each last started a run and when a schedule next will.
POST /flows/{id}/triggersAdd one: {"kind": "schedule", "schedule": {...}}, {"kind": "webhook"} or {"kind": "github", "events": ["push"], "repo": "you/app"}. The answer has the secret, only this once.
PATCH /flows/{id}/triggers/{triggerId}Turn it on or off (enabled), or change its schedule, events or repository.
DELETE /flows/{id}/triggers/{triggerId}Delete it.
POST /hooks/flows/{triggerId}Start the flow. No API key: a webhook sends its token, GitHub signs its deliveries.

A schedule is one of these, all UTC, with weekday 0 for Sunday:

JSON
{ "every": "minutes", "minutes": 15 }
{ "every": "hour", "minute": 5 }
{ "every": "day", "hour": 9, "minute": 0 }
{ "every": "week", "weekday": 1, "hour": 9, "minute": 0 }

Limits

LimitValue
Triggers a flow10
Shortest scheduleevery 15 minutes
Webhook body64 KB
Calls to one trigger30 a minute

A start still has to fit your run limits: if too many runs are going already, it doesn't start, and the trigger's list says so.

  • Agent PlaygroundQuickstart: build and run your first flow
  • Agent PlaygroundBlocks
  • Agent PlaygroundRecipes
  • SandboxesQuickstart: your first sandbox
  • SandboxesMCP server
  • SandboxesAPI reference