agent-swarm.devagent-swarm.dev

Schedules

Create and manage scheduled tasks — run agents on cron expressions or one-time delays

GET
/api/schedules

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Query Parameters

enabled?string
Value in"true" | "false"
name?string
scheduleType?string
Value in"recurring" | "one_time"
targetType?string
Value in"agent-task" | "workflow" | "script"
workflowId?string
Formatuuid
scriptName?string
hideCompleted?string
Value in"true" | "false"
consecutiveErrorsMin?|
Range0 <= value
lastRunStatus?string
Value in"failed" | "succeeded"
fields?string
Value in"full" | "slim"
key?string

Non-unique asset directory namespace (for example shared/ or personal//drafts/). Runtime write boundaries normalize and validate the canonical form.

Length1 <= length <= 255
keyPrefix?string

Non-unique asset directory namespace (for example shared/ or personal//drafts/). Runtime write boundaries normalize and validate the canonical form.

Length1 <= length <= 255

Response Body

application/json

curl -X GET "http://localhost:3013/api/schedules"
{
  "schedules": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "key": "string",
      "name": "string",
      "description": "string",
      "cronExpression": "string",
      "intervalMs": 0,
      "taskType": "string",
      "tags": [],
      "priority": 50,
      "targetAgentId": "string",
      "enabled": true,
      "lastRunAt": "2019-08-24T14:15:22Z",
      "nextRunAt": "2019-08-24T14:15:22Z",
      "createdByAgentId": "string",
      "timezone": "UTC",
      "consecutiveErrors": 0,
      "lastErrorAt": "2019-08-24T14:15:22Z",
      "lastErrorMessage": "string",
      "model": "string",
      "modelTier": "smol",
      "scheduleType": "recurring",
      "targetType": "agent-task",
      "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
      "scriptName": "string",
      "scriptArgs": {
        "property1": null,
        "property2": null
      },
      "createdAt": "2019-08-24T14:15:22Z",
      "lastUpdatedAt": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "updatedBy": "string",
      "favorite": true,
      "taskTemplatePreview": "string"
    }
  ],
  "count": 0
}
POST
/api/schedules

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "http://localhost:3013/api/schedules" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "name": "string",
  "description": "string",
  "cronExpression": "string",
  "intervalMs": 0,
  "taskTemplate": "string",
  "taskType": "string",
  "tags": [],
  "priority": 50,
  "targetAgentId": "string",
  "enabled": true,
  "lastRunAt": "2019-08-24T14:15:22Z",
  "nextRunAt": "2019-08-24T14:15:22Z",
  "createdByAgentId": "string",
  "timezone": "UTC",
  "consecutiveErrors": 0,
  "lastErrorAt": "2019-08-24T14:15:22Z",
  "lastErrorMessage": "string",
  "model": "string",
  "modelTier": "smol",
  "scheduleType": "recurring",
  "targetType": "agent-task",
  "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
  "scriptName": "string",
  "scriptArgs": {
    "property1": null,
    "property2": null
  },
  "createdAt": "2019-08-24T14:15:22Z",
  "lastUpdatedAt": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "updatedBy": "string",
  "favorite": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
DELETE
/api/schedules/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X DELETE "http://localhost:3013/api/schedules/string"
{
  "success": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/schedules/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/schedules/string"
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "name": "string",
  "description": "string",
  "cronExpression": "string",
  "intervalMs": 0,
  "taskTemplate": "string",
  "taskType": "string",
  "tags": [],
  "priority": 50,
  "targetAgentId": "string",
  "enabled": true,
  "lastRunAt": "2019-08-24T14:15:22Z",
  "nextRunAt": "2019-08-24T14:15:22Z",
  "createdByAgentId": "string",
  "timezone": "UTC",
  "consecutiveErrors": 0,
  "lastErrorAt": "2019-08-24T14:15:22Z",
  "lastErrorMessage": "string",
  "model": "string",
  "modelTier": "smol",
  "scheduleType": "recurring",
  "targetType": "agent-task",
  "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
  "scriptName": "string",
  "scriptArgs": {
    "property1": null,
    "property2": null
  },
  "createdAt": "2019-08-24T14:15:22Z",
  "lastUpdatedAt": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "updatedBy": "string",
  "favorite": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PATCH
/api/schedules/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "http://localhost:3013/api/schedules/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "name": "string",
  "description": "string",
  "cronExpression": "string",
  "intervalMs": 0,
  "taskTemplate": "string",
  "taskType": "string",
  "tags": [],
  "priority": 50,
  "targetAgentId": "string",
  "enabled": true,
  "lastRunAt": "2019-08-24T14:15:22Z",
  "nextRunAt": "2019-08-24T14:15:22Z",
  "createdByAgentId": "string",
  "timezone": "UTC",
  "consecutiveErrors": 0,
  "lastErrorAt": "2019-08-24T14:15:22Z",
  "lastErrorMessage": "string",
  "model": "string",
  "modelTier": "smol",
  "scheduleType": "recurring",
  "targetType": "agent-task",
  "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
  "scriptName": "string",
  "scriptArgs": {
    "property1": null,
    "property2": null
  },
  "createdAt": "2019-08-24T14:15:22Z",
  "lastUpdatedAt": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "updatedBy": "string",
  "favorite": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PUT
/api/schedules/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:3013/api/schedules/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "name": "string",
  "description": "string",
  "cronExpression": "string",
  "intervalMs": 0,
  "taskTemplate": "string",
  "taskType": "string",
  "tags": [],
  "priority": 50,
  "targetAgentId": "string",
  "enabled": true,
  "lastRunAt": "2019-08-24T14:15:22Z",
  "nextRunAt": "2019-08-24T14:15:22Z",
  "createdByAgentId": "string",
  "timezone": "UTC",
  "consecutiveErrors": 0,
  "lastErrorAt": "2019-08-24T14:15:22Z",
  "lastErrorMessage": "string",
  "model": "string",
  "modelTier": "smol",
  "scheduleType": "recurring",
  "targetType": "agent-task",
  "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
  "scriptName": "string",
  "scriptArgs": {
    "property1": null,
    "property2": null
  },
  "createdAt": "2019-08-24T14:15:22Z",
  "lastUpdatedAt": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "updatedBy": "string",
  "favorite": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST
/api/schedules/{id}/run

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X POST "http://localhost:3013/api/schedules/string/run"
{
  "schedule": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "key": "string",
    "name": "string",
    "description": "string",
    "cronExpression": "string",
    "intervalMs": 0,
    "taskTemplate": "string",
    "taskType": "string",
    "tags": [],
    "priority": 50,
    "targetAgentId": "string",
    "enabled": true,
    "lastRunAt": "2019-08-24T14:15:22Z",
    "nextRunAt": "2019-08-24T14:15:22Z",
    "createdByAgentId": "string",
    "timezone": "UTC",
    "consecutiveErrors": 0,
    "lastErrorAt": "2019-08-24T14:15:22Z",
    "lastErrorMessage": "string",
    "model": "string",
    "modelTier": "smol",
    "scheduleType": "recurring",
    "targetType": "agent-task",
    "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
    "scriptName": "string",
    "scriptArgs": {
      "property1": null,
      "property2": null
    },
    "createdAt": "2019-08-24T14:15:22Z",
    "lastUpdatedAt": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "updatedBy": "string",
    "favorite": true
  },
  "workflowRunIds": [
    "string"
  ],
  "task": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "key": "string",
    "agentId": "string",
    "creatorAgentId": "string",
    "task": "string",
    "title": "string",
    "status": "draft",
    "source": "mcp",
    "taskType": "string",
    "tags": [],
    "priority": 50,
    "dependsOn": [],
    "offeredTo": "string",
    "offeredAt": "2019-08-24T14:15:22Z",
    "acceptedAt": "2019-08-24T14:15:22Z",
    "rejectionReason": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "lastUpdatedAt": "2019-08-24T14:15:22Z",
    "finishedAt": "2019-08-24T14:15:22Z",
    "notifiedAt": "2019-08-24T14:15:22Z",
    "failureReason": "string",
    "output": "string",
    "progress": "string",
    "slackChannelId": "string",
    "slackThreadTs": "string",
    "slackTriggerMessageTs": "string",
    "slackUserId": "string",
    "slackReplySent": false,
    "slackProgressMessageTs": "string",
    "slackTreeRootMessageTs": "string",
    "vcsProvider": "github",
    "vcsRepo": "string",
    "vcsEventType": "string",
    "vcsNumber": 0,
    "vcsCommentId": 0,
    "vcsAuthor": "string",
    "vcsUrl": "string",
    "vcsInstallationId": 0,
    "vcsNodeId": "string",
    "agentmailInboxId": "string",
    "agentmailMessageId": "string",
    "agentmailThreadId": "string",
    "mentionMessageId": "string",
    "mentionChannelId": "string",
    "dir": "string",
    "parentTaskId": "string",
    "claudeSessionId": "string",
    "model": "string",
    "modelTier": "smol",
    "effort": "off",
    "scheduleId": "string",
    "workflowRunId": "5ca99e95-15bc-4b23-a2d2-f5f4060373ab",
    "workflowRunStepId": "87990b6e-ec5d-4b37-8b4e-9ef25c331b99",
    "contextKey": "string",
    "outputSchema": {
      "property1": null,
      "property2": null
    },
    "followUpConfig": {
      "disabled": true,
      "onCompleted": "string",
      "onFailed": "string"
    },
    "wasPaused": false,
    "compactionCount": 0,
    "peakContextPercent": 100,
    "peakContextTokens": 0,
    "contextWindowSize": 0,
    "credentialKeySuffix": "string",
    "credentialKeyType": "string",
    "requestedByUserId": "string",
    "swarmVersion": "string",
    "provider": "claude",
    "providerMeta": {
      "property1": null,
      "property2": null
    },
    "harnessVariant": "string",
    "harnessVariantMeta": {
      "property1": null,
      "property2": null
    },
    "totalCostUsd": 0,
    "routingAffinity": {
      "sourceAgentId": "string",
      "role": "string",
      "harnessProvider": "claude",
      "capabilities": [],
      "leadOnly": true
    },
    "routingAffinityInvalid": true
  }
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}