Create Trigger
Create a cron trigger (scheduled at once) or a stream trigger (subscribed to its stream).
A webhook or a polled provider is a source of a stream; its events fire a stream trigger on that stream.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Slug of the workspace the request acts in
120^[a-z0-9]+(?:-[a-z0-9]+)*$Body
Payload for creating a trigger on an existing agent.
UUID of the agent to invoke when the trigger fires.
Human-readable trigger name.
1 - 255'cron' for scheduled, 'stream' to run on the events of a stream (a webhook or a polled provider is a source of a stream).
cron, stream Fire once for a batch of events instead of once per event: {"window": "1h", "max_events": 50} fires when the hour has passed or 50 events joined, whichever comes first. Null fires on every event.
Optional conditions evaluated against event data before firing. An LLM condition ({"type": "llm", "description": ...}) must name the chat or decision model instance that evaluates it in "model_id"; each sub-condition of a combined condition names its own.
5- or 6-field cron expression (required when trigger_type='cron').
Short summary of what this trigger does.
1000Whether the trigger is active immediately on creation.
Which events of the stream fire it: {"kinds": ["push"], "fields": {"raw_data.action": "opened"}}. Empty means every event.
Auto-disable after this many consecutive failed executions.
1 <= x <= 100What the next event of the same session does: {"continue": true, "idle_timeout": "30m"} joins the running task. Null takes the source type's default.
Stream whose events fire this trigger (required when trigger_type='stream').
Saved task the trigger runs, of the same agent: its text and parameters are what each firing asks, in place of task_parameters.
Parameters merged into the task created when the trigger fires.
IANA timezone for cron evaluation (e.g. 'UTC', 'America/New_York').
Response
Successful Response
Response model for trigger data.
'needs_owner' when the person who configured it can no longer run its agent; the trigger stays stopped until it is enabled again, and the next event re-checks that person's access.
active, inactive, needs_owner The batch window it fires per; null fires on every event.
Which events fire it.
When the trigger's stream last recorded an event.
What the next event of the same session does; null takes the defaults.
Stream whose events fire this trigger.
Saved task each firing asks, in place of task_parameters.