1. Schedule one message
runAt is an RFC 3339 time. Pick one five minutes from now so you can watch
this one go (the first date form is macOS, the fallback is Linux):
Idempotency-Key is required. Send the same key and body twice and you get
the same schedule back instead of a second one; the same key with a different
body is rejected, so this one folds in the time:
runAt that has already passed fires right away rather than being rejected.
spawn starts a fresh thread every time the schedule fires, which keeps
unrelated runs out of one context window. Once a once schedule fires, it sets
completedAt and flips enabled to false. Give it new once timing to bring
it back.
2. Make it recurring
Five-field cron plus an IANA timezone, so it follows daylight saving where the person reading it lives:3. Or keep it in one conversation
Pointtarget at a thread the same agent already owns. Each fire is queued onto
that thread, so the agent keeps its context from run to run:
4. Pause or delete
Pausing keeps the schedule and its history:DELETE /v1/schedules/{scheduleId} removes it for good. Threads it already
started stay where they are.
Check it worked
After the run time passes, read the schedule back:lastStatus is fired, skipped, or failed. lastThreadId points at the
thread the message landed in; open its events to
see what the agent did. nextAt is when it runs again. To list just the
one-offs, GET /v1/agents/$AGENT_ID/schedules?kind=once.
When it goes sideways
409on create. Either thatIdempotency-Keyalready went with a different body, or the agent is at its cap of 64 active or 256 kept schedules (Limits).lastStatus: skipped. The previous scheduled turn was still running, so the late fire was dropped rather than stacked behind it. Disabling the agent’s identity skips every fire too, and so does an empty credit balance for a repeated schedule.- A one-off fired but the thread is
awaiting. The workspace ran out of credits. The turn is parked on abilling_creditswait and carries on by itself once credits are added. disabledReason: thread_not_found. Athreadtarget pointed at a thread that no longer exists, so Matrices switched the schedule off rather than guessing. A fire that fails outright switches it off the same way.
Where next
Wire up a team
Let one agent’s output wake another.
Schedules
Timing, targets, and what a fire freezes.