Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create agent dispatch batch

POST/workspaces/{organizationId}/agent/dispatch-batch
Path parameters
organizationIdstringrequired
Request body
application/json
itemsobject[]required
min items 1 · max items 50
Show properties
Array of object
issueIdstringrequired
min length 1
agentIdstring
branchstring | null
instructionsstring
queuedAfterstring
secondaryReposobject[]
max items 5
Show properties
Array of object
repostringrequired
matches ^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$
accessstring
default: "read"
Allowed:readwrite
effortstring
Allowed:lowmediumhighmax
maxDurationinteger

Wall-clock run budget in minutes; past it the lane is canceled and escalated on the issue

min 1 · max 1440
resultSchemastring | object

JSON Schema (draft-07) the lane's final output must validate against, or "lane" for the built-in {verdict, summary, filesChanged} shape. The validated value lands on session.structuredResult.

Show properties
Any of:
string
string
object
object
Responses
200

Per-item dispatch results — each entry carries a sessionId or an error, independent of sibling failures

batchIdstringrequired
resultsobject[]required
Show properties
Array of object
issueIdstringrequired
sessionIdstring | nullrequired
statusstring | nullrequired
Allowed:createdrunningwaitingcompletedfailedcancelednull
errorstring | nullrequired
Try it
Server
Parameters
Bodyapplication/json
Request
curl -X POST '/workspaces/string/agent/dispatch-batch' \
  -H 'Content-Type: application/json' \
  -d '{
  "items": [
    {
      "issueId": "string",
      "agentId": "string",
      "branch": "string",
      "instructions": "string",
      "queuedAfter": "string",
      "secondaryRepos": [
        {
          "repo": "string",
          "access": "read"
        }
      ],
      "effort": "low",
      "maxDuration": 1,
      "resultSchema": "lane"
    }
  ]
}'
Response
{
  "batchId": "string",
  "results": [
    {
      "issueId": "string",
      "sessionId": "string",
      "status": "created",
      "error": "string"
    }
  ]
}