Agents

Triggers

What starts an agent: you, a schedule, a webhook, an alert, or a Slack event, and what each one hands the steps after it.

The trigger is the first step of every agent. It decides when the agent runs and what the steps after it start with. Each agent has exactly one, chosen with Choose a trigger on an empty canvas. It only fires once the agent is published and Active.

Choose a trigger: Manual, Schedule, Webhook, Alert, and Slack events with 7 options.
TriggerStarts the agent whenSteps read
ManualYou press Run now on its runs pageNothing
ScheduleThe time comes roundNothing
WebhookSomething POSTs to its URL{{ $trigger.body }}, .headers, .query
AlertOne of its chosen alerts fires{{ $trigger.alert }}, {{ $trigger.value }}
Slack eventsSlack sends a matching event{{ $trigger.event }}

A trigger is free. Every other step that runs uses an Execution; see Plans and billing.

Manual

For agents you run by hand, and for trying an idea before you give it a real trigger. Any agent, whatever its trigger, can also be run by hand with Run now.

Schedule

Pick Every 15 minutes, Every hour, Every day, Every weekday, Every week, Every month, or Custom for a cron expression such as 0 9 * * 1. Then the time, the days, and a timezone. It starts in the timezone your browser is in.

Use it for digests, nightly checks and weekly reports, for example a Lucid step that asks what changed in error rate since yesterday? and a Slack step that posts the answer.

Webhook

Once the agent is saved, the trigger shows its Webhook URL. POST JSON to it and the agent starts; the call returns 202 with the run's execution_id.

curl -X POST "<your webhook URL>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: deploy-4812" \
  -d '{"service": "checkout", "version": "4.2.0"}'
  • The URL is the credential. It contains the agent's secret, so anyone who has it can start a run. Keep it like a password.
  • Require a signature makes the agent accept only signed requests. Sign the raw body with HMAC-SHA256 using the Signing secret the trigger shows, and send it as sha256=<hex> in the Signature header (X-Hub-Signature-256 by default).
  • Idempotency-Key header: a second request with the same key within 24 hours doesn't start another run. It returns the first run's ID instead.

Steps read the request as {{ $trigger.body }}, {{ $trigger.query }} and {{ $trigger.headers }}.

Alert

Pick one or more alerts. Each time any of them fires, the agent runs once. An alert's list shows how many agents it starts, and its history shows what they did.

This is how a threshold becomes an action. The alert decides when; the agent decides what to do. The steps get everything the alert knows:

FieldWhat it is
$trigger.alert.name, .idWhich alert fired
$trigger.alert.scope, .measure, .aggregation, .filterWhat it watches: runs, spans or an eval, and how it measures them
$trigger.alert.operator, .threshold, .window_secondsThe condition it crossed
$trigger.alert.eval_lineage_id, .eval_nameFor an eval alert, which eval
$trigger.value, $trigger.sample_sizeThe value that crossed the threshold, and how many items it was measured over
$trigger.fired_atWhen it fired

The common next step is Lucid → Investigate an alert into issues, which reads the failures behind the alert and files or updates an issue. Start from the Triage alerts into issues template.

Slack events

A message, a mention or a reaction in Slack can start an agent. Slack must be connected for your organization first; see Slack.

TriggerFires when
Slack: On bot app mentionSomeone @-mentions the Trodo bot
Slack: On new message in channelA person posts in the chosen channel or DM
Slack: On reaction addedAn emoji reaction is added, optionally only a chosen one
Slack: On file sharedA file is shared in the chosen channel or DM
Slack: On any eventAny event Slack sends for the chosen channel or DM
Slack: On new public channel createdA public channel is created
Slack: On new userSomeone joins the workspace

Steps read the Slack event as {{ $trigger.event }}, for example {{ $trigger.event.text }} for a message's text. Messages, mentions and reactions from the Trodo bot itself don't start an agent, and when Slack delivers an event twice the agent runs once.

GitHub and Linear don't start agents. To act on their events, point their webhooks at a Webhook trigger.

On this page