Create a scheduled agent task

Create a scheduled agent task

Schedules prompt to run as an agent turn on a cron cadence or once at fireAt, in timezone, optionally with a fixed model, notify/overlap policies and a delivery target. With agentId each fire runs in that agent (one of the caller's own) and waits while the agent is busy unless overlapPolicy says otherwise; without it the task gets a dedicated hidden session, which cannot message agents. The CLI's tasks command group.

POST/api/agent/schedules
Body
vaultIdstringrequired
triggerenumrequired

One of: cron, once

promptstringrequired
titlestring
cronstring
timezonestring
fireAtstring
modelstring
notifyPolicystring
overlapPolicystring
deliveryobject

channelTypeenumrequired

One of: slack

channelstringrequired
threadTsstring
agentIdobject

Request

curl
curl -X POST https://trickest.io/api/agent/schedules \
  -H "Authorization: Token $TRICKEST_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ }'

Responses

201The new schedule
scheduleobjectrequired

idstringrequired
vaultIdstringrequired
sessionIdstringrequired
agentobjectrequired

idstringrequired
titlestringrequired
titlestringrequired
triggerenumrequired

One of: cron, once

promptstringrequired
cronstringrequired
timezonestringrequired
modelstringrequired
authedbooleanrequired
notifyPolicystringrequired
overlapPolicystringrequired
deliveryobjectrequired
fireAtstringrequired
enabledbooleanrequired
nextFireAtstringrequired
lastFiredAtstringrequired
createdAtstringrequired
updatedAtstringrequired
400Bad Request – validation error or malformed input
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.

401Unauthorized – missing or expired token
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.

403Forbidden – insufficient permissions
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.

429Too Many Requests – rate limited
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.

500Internal Server Error
codestringrequired
messagestringrequired
detailsobject

Field-level detail when the error is a validation failure.