agent-swarm.devagent-swarm.dev

Poll

Long-poll endpoints for real-time task and message notifications without WebSockets

POST
/api/channel-activity/commit-cursors

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

curl -X POST "http://localhost:3013/api/channel-activity/commit-cursors" \  -H "Content-Type: application/json" \  -d '{    "cursorUpdates": [      {        "channelId": "string",        "ts": "string"      }    ]  }'
{
  "success": true,
  "committed": 0
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/poll

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Response Body

application/json

application/json

application/json

curl -X GET "http://localhost:3013/api/poll"
{
  "trigger": {
    "type": "task_offered",
    "taskId": "string",
    "task": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "key": "string",
      "agentId": "string",
      "creatorAgentId": "string",
      "task": "string",
      "title": "string",
      "status": "backlog",
      "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": []
      }
    }
  }
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}