agentSchedules

Creates an agent schedule.

Creates a schedule for an agent after validating its cadence, timezone, and optional project or task context.

<Check title="Required Permissions" icon="key">Any authenticated user.</Check>

post/agents/{agentId}/schedules

Path parameters

agentIdstring uuid required

The Custom Agent ID.

Request body

namestring required

The schedule display name.

promptstring nullable

Optional custom instructions for the initial message. Omitted, null, or blank input clears custom instructions.

cronRulestring required

The cron rule used for recurring execution.

recurrenceIntervalinteger nullable

The number of matching cron occurrences between scheduled runs.

timezonestring nullable

The timezone for the cron rule.

projectIdstring uuid nullable

The optional project context id.

taskIdstring uuid nullable

The optional task context id.

isEnabledboolean nullable

Whether the schedule is enabled.

Response

OK

namestring nullable

The schedule display name.

idstring uuid

The schedule id.

createdOnstring date-time

When the schedule was created.

agentIdstring uuid nullable

The agent id that is executed by this schedule.

typestring nullable

Runtime target type: personal-agent or custom-agent.

ownerUserIdstring uuid

The user id whose context is used to execute the scheduled run.

promptstring nullable

Optional custom instructions. An omitted or null prompt means no custom instructions.

cronRulestring nullable

The normalized cron rule used for recurring execution.

recurrenceIntervalinteger

The number of matching cron occurrences between scheduled runs.

timezonestring nullable

The timezone used to evaluate the cron rule.

projectIdstring uuid nullable

The optional project context id.

taskIdstring uuid nullable

The optional task context id.

isEnabledboolean

Whether this schedule is active.

needsAttentionboolean

Whether the schedule needs user attention.

lastFailureReasonstring nullable

The latest rejection reason.

consecutiveFailureCountinteger

The number of consecutive failed scheduled executions.

lastAttemptOnstring date-time nullable

The latest occurrence time.

lastSuccessfulRunOnstring date-time nullable

The latest accepted occurrence time.

Changes

Changed in 2 of the 11 revisions of this API.12

  • eadefd26df1211See the full diff
    • ▲

      the response property became nullable for the status

      response-property-became-nullable

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      endpoint added

      endpoint-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog