Manage automations with the CLI
Create schedules, pause jobs, trigger runs, and inspect automation history.
Automations run an agent prompt on a schedule or on demand. Select the agent
with --agent-id or MF_AGENT_ID.
Create a schedule
mf automations create \
--agent-id agt_xxx \
--title "Weekday summary" \
--prompt "Summarize open work and blockers." \
--schedule-preset weekdays --at 09:00
Say when it runs with a preset: hourly, daily, weekdays or weekly,
timed with --at HH:MM (09:00 by default; hourly takes its minutes) and,
for weekly, --day mon … sun. For any other schedule, pass an iCalendar
--rrule instead; the preset is then custom, and RRULE: is an optional
prefix:
mf automations create \
--agent-id agt_xxx \
--title "Monthly review" \
--prompt "Review last month's incidents." \
--rrule 'FREQ=MONTHLY;BYMONTHDAY=1;BYHOUR=9;BYMINUTE=0'
The schedule keeps this machine’s timezone unless --timezone names an IANA
zone such as Europe/London. Use optional ISO8601 --dtstart to control the
first occurrence. create prints the schedule and when it runs next.
Use --model only when this job should override the agent’s normal model.
Inspect and trigger
mf automations list --agent-id agt_xxx
mf automations get aut_xxx
mf automations run aut_xxx --wait
mf automations result aut_xxx
get includes recent runs. run triggers one run immediately without changing
the saved schedule. With --wait it follows the run’s reply as it streams, the
way mf agent send shows a reply, then says how the run ended and whether it
reached the automation’s channel. Ctrl-C only stops following; the run goes on.
result prints the full reply of the latest run, or why it failed; pass
--run aur_xxx for one of the 20 runs get lists. A run still going is
followed to its end. Both commands exit 1 for a failed run, and with --json
print { run, text, usage, error }.
Update, pause, or delete
mf automations update aut_xxx --status paused
mf automations update aut_xxx --status active
mf automations update aut_xxx --schedule-preset daily --at 18:00
mf automations update aut_xxx --at 07:30 # the same preset, another time
mf automations update aut_xxx --timezone UTC
mf automations update aut_xxx --clear-model
mf automations delete aut_xxx --yes
Warning: Deletion is irreversible and the CLI refuses it without
--yes; it does not open an interactive prompt. Use--jsonfor scripts and verify the automation ID before mutation.