DoubleX AgentesDocs

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.

Terminal
doublex triggers list | create | update | run | delete | apps

Types#

TypeOptionWhen it runs
Scheduled--cron "<expression>" or --describe "<phrase>"On a recurring schedule.
One-time--once <date and time>Once, at the set time.
Webhook--webhookWhen 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#

Terminal
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_Paulo

A 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:

Terminal
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_6a2c4e8b1d3f

The 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#

Terminal
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#

Terminal
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:

Terminal
doublex triggers apps
EventFires whenParameters
gmail.new_emailAn email arrivesquery: a Gmail filter, for example from:customer.com is:unread
google-calendar.new_eventA new event appears on the calendarcalendar_id (default primary)
google-calendar.event_startingAn event is about to startcalendar_id, minutes_before (default 15)
google-drive.new_fileA new file appears in Drivefolder: the folder to watch
google-sheets.new_rowA new row appears in the spreadsheetspreadsheet (required), sheet
Terminal
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#

OptionWhat 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.
--rawWebhook and app: sends only the event JSON, with no prompt.

List, edit and run#

Terminal
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 --yes
  • update accepts --name, --prompt, --cron (and the simple formats), --once, --model (none goes back to the agent's model), --timezone, --raw, --enable and --disable. The trigger type can't change: to switch it, delete the trigger and create a new one.
  • run runs 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.