Script Runs
Inspect durable script workflow runs, review journal entries, and monitor swarm-script, raw-LLM, and agent-task execution status through the Script Runs API
Authorization
bearerAuth 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/internal/raw-llm" \ -H "Content-Type: application/json" \ -d '{ "prompt": "string" }'{
"result": null,
"model": "string"
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidRequest 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/internal/script-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/agent-task" \ -H "Content-Type: application/json" \ -d '{ "stepKey": "string" }'{
"taskId": "string",
"taskOutput": "string"
}{
"taskId": "string",
"status": "backlog"
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidResponse Body
application/json
curl -X POST "http://localhost:3013/api/internal/script-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/heartbeat"{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:3013/api/internal/script-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/status" \ -H "Content-Type: application/json" \ -d '{ "status": "completed" }'{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidRequest 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/internal/script-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/steps" \ -H "Content-Type: application/json" \ -d '{ "stepKey": "string", "stepType": "string", "status": "completed" }'{
"ok": true
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuid1 <= lengthResponse Body
application/json
application/json
curl -X GET "http://localhost:3013/api/internal/script-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/steps/string"{
"stepKey": "string",
"stepType": "string",
"status": "completed",
"result": null,
"error": "string"
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Query Parameters
"running" | "paused" | "completed" | "failed" | "cancelled" | "aborted_limit"1 <= value <= 5000 <= valueResponse Body
application/json
curl -X GET "http://localhost:3013/api/script-runs"{
"runs": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"agentId": "string",
"scriptName": "string",
"kind": "workflow",
"status": "running",
"pid": 0,
"startedAt": "string",
"finishedAt": "string",
"error": "string",
"lastHeartbeatAt": "string",
"idempotencyKey": "string",
"requestedByUserId": "string"
}
],
"total": 0
}Authorization
bearerAuth 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
application/json
curl -X POST "http://localhost:3013/api/script-runs" \ -H "Content-Type: application/json" \ -d '{ "source": "string" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"status": "running",
"url": "string"
}{
"error": "string",
"property1": null,
"property2": null
}{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"status": "running",
"url": "string"
}{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidResponse Body
application/json
curl -X DELETE "http://localhost:3013/api/script-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"error": "string",
"property1": null,
"property2": null
}Authorization
bearerAuth API key via Authorization: Bearer <API_KEY>
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "http://localhost:3013/api/script-runs/497f6eca-6276-4993-bfeb-53cbbbba6f08"{
"run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"agentId": "string",
"scriptName": "string",
"source": "string",
"args": null,
"kind": "workflow",
"status": "running",
"pid": 0,
"startedAt": "string",
"finishedAt": "string",
"output": null,
"error": "string",
"lastHeartbeatAt": "string",
"idempotencyKey": "string",
"requestedByUserId": "string"
},
"journal": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"runId": "78c33d18-170c-44d3-a227-b3194f134f73",
"stepKey": "string",
"stepType": "string",
"config": {
"property1": null,
"property2": null
},
"status": "completed",
"result": null,
"error": "string",
"startedAt": "string",
"completedAt": "string",
"durationMs": 0
}
]
}{
"error": "string",
"property1": null,
"property2": null
}