Schedule work
Ask an Agent to review its notes every weekday, then inspect or pause the schedule.
A schedule sends a message to an Agent at a chosen time. In the app, schedules are called routines.
First create the meeting assistant and give it some notes. Keep that example's agent_id and agent_thread_id in the same Bash shell.
Create a weekday review
This schedule asks the assistant to review its conversation every weekday at 9 AM in Zurich. Change the message and timezone for your work.
schedule_id=$(uuidgen) &&
schedule_body=$(jq -nc --arg id "$schedule_id" --arg thread "$agent_thread_id" \
'{id: $id, thread_id: $thread,
message: ("Review the meeting notes in this conversation. " +
"Summarize decisions still open and actions due next."),
cron: "0 9 * * 1-5", timezone: "Europe/Zurich"}') &&
api "/agents/$agent_id/schedules" \
-H 'Content-Type: application/json' -d "$schedule_body"The response includes next_run_at. Check that time before leaving the schedule active. Keep schedule_id and schedule_body for retries. A new ID creates another schedule.
For a one-time task, replace cron with at, using a future timestamp with a UTC offset. For example, the format is 2030-01-02T09:00:00+01:00.
Review and change future work
Read this Agent's schedules:
api "/agents/$agent_id/schedules" | jq '.data'Look at last_run.status for the previous result. Use its run_id and the schedule's thread_id to read the output.
Pause future submissions when you no longer need them:
api "/schedules/$schedule_id" -X PATCH \
-H 'Content-Type: application/json' -d '{"status":"paused"}'Check the schedule list after saving. Use status: "active" to resume, or DELETE /v1/schedules/{schedule_id} to remove it.
Pausing or deleting a schedule does not cancel work already accepted. Cancel that run separately.
Change the message or timing
Send changed fields with PATCH /v1/schedules/{schedule_id}. Omitted fields stay unchanged. Do not send null to clear fields.
To switch between recurring and one-time timing, send only the new cron or at field. It replaces the previous timing.
Use an IANA timezone such as Europe/Zurich. At daylight-saving changes, skipped local times move forward by the gap. Repeated times run at their first occurrence.
Understand late, failed, and one-time runs
The daemon host must be awake for work to run. After downtime, missed recurring runs combine into one catch-up run.
Delivery failures can pause a schedule. A failed accepted run does not automatically pause recurring work.
A one-time schedule stops submitting after acceptance, even if its run later fails. Inspect the saved run before deciding whether to request that work again.
Schedule endpoint reference
| Method and path | Use |
|---|---|
POST /v1/agents/{agent_id}/schedules | Create with a caller-generated UUID and exactly one of cron or at. |
GET /v1/agents/{agent_id}/schedules | List schedules for one Agent. |
GET /v1/schedules | List all schedules. Use attention=true for delivery problems. |
PATCH /v1/schedules/{schedule_id} | Edit, pause, or resume. |
DELETE /v1/schedules/{schedule_id} | Prevent future submissions. |
Follow numbered pagination.page and pages in list responses. The target conversation must belong to the Agent.