Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agent37.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

A schedule fires a response on its instance at the times you set, with no caller attached. There are no webhooks. You pull results when you want them. A schedule lives on one instance and runs unattended. Each time it fires, it produces a run you can read back later.

Endpoints

ActionEndpoint
CreatePOST /v1/instances/{id}/schedules
List on an instanceGET /v1/instances/{id}/schedules
UpdatePATCH /v1/schedules/{sid}
DeleteDELETE /v1/schedules/{sid}
Pause / resumePOST /v1/schedules/{sid}/pause · /resume
Run nowPOST /v1/schedules/{sid}/run
Read resultsGET /v1/schedules/{sid}/runs

Create a schedule

Pass a cron expression and the input the agent runs each time it fires.
cron
string
required
A cron expression in the standard five-field format (min hour day month weekday). 0 8 * * * fires daily at 08:00.
input
string
required
The message or task the agent runs on each fire. Reference uploaded files by path, same as a normal message.
agent
string
For a multi-agent template, which agent each run uses. Defaults to the template’s primary.
metadata
object
Up to 16 key/value pairs. Echoed back, never interpreted.

A run

A schedule fires a response, and GET /v1/schedules/{sid}/runs returns one entry per fire.
id
string
The id of this run.
response_id
string
The resp_ id of the response this run produced. Fetch it with GET /v1/responses/{id}.
status
string
in_progress, then completed, failed, or cancelled.
started_at
integer
When the run began, in unix seconds.
finished_at
integer
When the run ended, in unix seconds. Absent while in_progress.
output_text
string
The agent’s final answer for this run.
usage
object
Token counts and cost_usd for the run.

Daily digest

Create a schedule that fires every morning, then read what it has produced.
curl -X POST https://api.agent37.com/v1/instances/inst_x7/schedules \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "cron": "0 8 * * *",
    "input": "Summarize overnight emails into a digest."
  }'
# -> { "id": "sched_3" }
Runs is a list endpoint: it returns { data, has_more, next_cursor }. Page with ?cursor= and ?limit=.

Pause, resume, and run now

POST /v1/schedules/{sid}/pause stops a schedule from firing without deleting it; POST /v1/schedules/{sid}/resume starts it again on the same cron. Past runs stay readable while paused.
POST /v1/schedules/{sid}/run fires the schedule immediately, outside its cron, and records a run like any other. Use it to test a new schedule without waiting for the next tick.
DELETE /v1/schedules/{sid} removes the schedule. Pause instead if you only need to stop it temporarily.

Next steps

Send a message

The core call a schedule fires, and the response shape it produces.

Instances

Schedules live on an instance that bills compute while it exists.