CLI › Commands
Triggers
Make agents work on their own, on a schedule, once, through a webhook or when something happens in an app.
A trigger runs an agent without anyone sending a message. Each run becomes a conversation on the Tasks page, with the source Trigger or Webhook.
doublex triggers list | create | update | run | delete | appsTypes#
| Type | Option | When it runs |
|---|---|---|
| Scheduled | --cron "<expression>" or --describe "<phrase>" | On a recurring schedule. |
| One-time | --once <date and time> | Once, at the set time. |
| Webhook | --webhook | When another system calls the trigger's URL. See Webhooks. |
| App event | --app <event> --connector <id> | When an email arrives, a calendar event is created, a file shows up in Drive or a new row appears in a spreadsheet. |
Scheduled#
doublex triggers create agt_8f3a2b1c9d0e --name "8 a.m. briefing" \
--prompt "Write the daily briefing for today and email it to me" \
--cron "0 8 * * 1-5" --timezone America/Sao_PauloA cron expression has 5 fields (minute, hour, day of month, month, day of week). The minimum interval is 5 minutes.
Prefer to write it in plain English? Use --describe and the server converts the phrase into cron:
doublex triggers create agt_8f3a2b1c9d0e --name "Weekly report" \
--prompt "Build the sales report for the week" \
--describe "every Friday at 5:30pm"cron: 30 17 * * 5
trg_6a2c4e8b1d3fThe conversion uses an AI model and consumes a few credits. The simple formats --every <minutes>, --daily HH:MM and --weekly <day>@HH:MM also work (day from 0, Sunday, to 6, Saturday).
One-time#
doublex triggers create agt_8f3a2b1c9d0e --name "Renewal reminder" \
--prompt "Check whether the Empresa SA contract was renewed and let me know" \
--once "2026-11-03T14:00"The date must be in the future. With no time zone in the date, the CLI uses your computer's time zone; to pin a different one, include the offset, as in 2026-11-03T14:00-03:00.
Webhook#
doublex triggers create agt_8f3a2b1c9d0e --name "New lead" --webhook \
--prompt "New lead: {{name}} ({{email}}). Qualify it and log it in the CRM."The CLI shows the webhook URL and secret. With --raw, the agent receives only the JSON body, with no prompt.
App event#
See the available events and your connected accounts:
doublex triggers apps| Event | Fires when | Parameters |
|---|---|---|
gmail.new_email | An email arrives | query: a Gmail filter, for example from:customer.com is:unread |
google-calendar.new_event | A new event appears on the calendar | calendar_id (default primary) |
google-calendar.event_starting | An event is about to start | calendar_id, minutes_before (default 15) |
google-drive.new_file | A new file appears in Drive | folder: the folder to watch |
google-sheets.new_row | A new row appears in the spreadsheet | spreadsheet (required), sheet |
doublex triggers create agt_2b7e4c6a1f3d --name "Order by email" \
--app gmail.new_email --connector con_7a9b1c3d5e2f --param "query=subject:order is:unread" \
--prompt "New order from {{from}}: {{subject}}. Log it in the orders spreadsheet and reply to confirm."The prompt can reference event fields in double curly braces: {{from}}, {{subject}}, {{body}} in Gmail; {{title}}, {{start}}, {{attendees}} in Calendar; {{name}}, {{link}} in Drive; {{row}} in spreadsheets. The connector must be yours (or shared with you) and for the same service as the event.
The platform checks the app every two minutes. The first check only sets the starting point: anything that existed before the trigger doesn't fire it.
Common options#
| Option | What it's for |
|---|---|
--name <name> | Required. Up to 80 characters. |
--prompt <text> | What the agent should do (up to 4,000 characters). Accepts - (stdin) and --prompt-file <file>. |
--model <provider/model> | A model just for this trigger. auto is DoubleX Auto. Without it, the agent's model is used. |
--timezone <zone> | IANA time zone for scheduled and one-time triggers. The default is America/Sao_Paulo. |
--raw | Webhook and app: sends only the event JSON, with no prompt. |
List, edit and run#
doublex triggers list --agent agt_8f3a2b1c9d0e
doublex triggers update trg_6a2c4e8b1d3f --cron "0 9 * * 1-5" --model none
doublex triggers update trg_6a2c4e8b1d3f --disable
doublex triggers run trg_6a2c4e8b1d3f
doublex triggers delete trg_6a2c4e8b1d3f --yesupdateaccepts--name,--prompt,--cron(and the simple formats),--once,--model(nonegoes back to the agent's model),--timezone,--raw,--enableand--disable. The trigger type can't change: to switch it, delete the trigger and create a new one.runruns the trigger now, in the background. For an app trigger, it checks the app right away and shows how many new items it found.- The list shows when each trigger runs, whether it's active, and its next run.