agent-swarm.devagent-swarm.dev

Workflows

Define and execute DAG-based multi-step workflows with branching, triggers, and agent task nodes

GET
/api/executor-types

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Response Body

application/json

curl -X GET "http://localhost:3013/api/executor-types"
{
  "executorTypes": [
    {
      "type": "string",
      "mode": "instant",
      "configSchema": {
        "property1": null,
        "property2": null
      },
      "outputSchema": {
        "property1": null,
        "property2": null
      }
    }
  ]
}
GET
/api/executor-types/{type}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

type*string

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/executor-types/string"
{
  "type": "string",
  "mode": "instant",
  "configSchema": {
    "property1": null,
    "property2": null
  },
  "outputSchema": {
    "property1": null,
    "property2": null
  }
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/workflow-runs/{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/workflow-runs/string"
{
  "run": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
    "status": "running",
    "triggerData": null,
    "context": {
      "property1": null,
      "property2": null
    },
    "error": "string",
    "startedAt": "string",
    "lastUpdatedAt": "string",
    "finishedAt": "string"
  },
  "steps": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "runId": "78c33d18-170c-44d3-a227-b3194f134f73",
      "nodeId": "string",
      "nodeType": "string",
      "status": "pending",
      "input": null,
      "output": null,
      "error": "string",
      "startedAt": "string",
      "finishedAt": "string",
      "retryCount": 0,
      "maxRetries": 3,
      "nextRetryAt": "string",
      "idempotencyKey": "string",
      "diagnostics": "string",
      "nextPort": "string"
    }
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST
/api/workflow-runs/{id}/cancel

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.

reason?string

Response Body

application/json

application/json

curl -X POST "http://localhost:3013/api/workflow-runs/string/cancel" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST
/api/workflow-runs/{id}/retry

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 POST "http://localhost:3013/api/workflow-runs/string/retry"
{
  "success": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/workflows

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Query Parameters

enabled?string
Value in"true" | "false"
consecutiveErrorsMin?|
Range0 <= value
lastRunStatus?string
Value in"running" | "waiting" | "completed" | "failed" | "skipped" | "cancelled"
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
fields?string
Value in"full" | "slim"

Response Body

application/json

curl -X GET "http://localhost:3013/api/workflows"
[
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "key": "string",
    "name": "string",
    "description": "string",
    "enabled": true,
    "dir": "string",
    "vcsRepo": "string",
    "createdByAgentId": "string",
    "createdAt": "string",
    "lastUpdatedAt": "string",
    "createdBy": "string",
    "updatedBy": "string",
    "favorite": true,
    "nodeCount": 0
  }
]
POST
/api/workflows

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/workflows" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "definition": {      "nodes": [        {          "id": "string",          "type": "string",          "config": {            "property1": null,            "property2": null          }        }      ]    }  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "name": "string",
  "description": "string",
  "enabled": true,
  "definition": {
    "nodes": [
      {
        "id": "string",
        "type": "string",
        "label": "string",
        "config": {
          "property1": null,
          "property2": null
        },
        "next": "string",
        "validation": {
          "executor": "validate",
          "config": {
            "property1": null,
            "property2": null
          },
          "mustPass": false,
          "retry": {
            "maxRetries": 3,
            "strategy": "exponential",
            "baseDelayMs": 1000,
            "maxDelayMs": 60000
          }
        },
        "retry": {
          "maxRetries": 3,
          "strategy": "exponential",
          "baseDelayMs": 1000,
          "maxDelayMs": 60000
        },
        "inputs": {
          "property1": "string",
          "property2": "string"
        },
        "inputSchema": {
          "property1": null,
          "property2": null
        },
        "outputSchema": {
          "property1": null,
          "property2": null
        }
      }
    ],
    "onNodeFailure": "fail"
  },
  "triggers": [],
  "cooldown": {
    "hours": 0,
    "minutes": 0,
    "seconds": 0
  },
  "input": {
    "property1": "string",
    "property2": "string"
  },
  "triggerSchema": {
    "property1": null,
    "property2": null
  },
  "dir": "string",
  "vcsRepo": "string",
  "createdByAgentId": "string",
  "createdAt": "string",
  "lastUpdatedAt": "string",
  "createdBy": "string",
  "updatedBy": "string",
  "favorite": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
DELETE
/api/workflows/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "http://localhost:3013/api/workflows/string"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/workflows/{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/workflows/string"
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "name": "string",
  "description": "string",
  "enabled": true,
  "definition": {
    "nodes": [
      {
        "id": "string",
        "type": "string",
        "label": "string",
        "config": {
          "property1": null,
          "property2": null
        },
        "next": "string",
        "validation": {
          "executor": "validate",
          "config": {
            "property1": null,
            "property2": null
          },
          "mustPass": false,
          "retry": {
            "maxRetries": 3,
            "strategy": "exponential",
            "baseDelayMs": 1000,
            "maxDelayMs": 60000
          }
        },
        "retry": {
          "maxRetries": 3,
          "strategy": "exponential",
          "baseDelayMs": 1000,
          "maxDelayMs": 60000
        },
        "inputs": {
          "property1": "string",
          "property2": "string"
        },
        "inputSchema": {
          "property1": null,
          "property2": null
        },
        "outputSchema": {
          "property1": null,
          "property2": null
        }
      }
    ],
    "onNodeFailure": "fail"
  },
  "triggers": [],
  "cooldown": {
    "hours": 0,
    "minutes": 0,
    "seconds": 0
  },
  "input": {
    "property1": "string",
    "property2": "string"
  },
  "triggerSchema": {
    "property1": null,
    "property2": null
  },
  "dir": "string",
  "vcsRepo": "string",
  "createdByAgentId": "string",
  "createdAt": "string",
  "lastUpdatedAt": "string",
  "createdBy": "string",
  "updatedBy": "string",
  "favorite": true,
  "edges": [
    {
      "id": "string",
      "source": "string",
      "sourcePort": "string",
      "target": "string"
    }
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PATCH
/api/workflows/{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

curl -X PATCH "http://localhost:3013/api/workflows/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "name": "string",
  "description": "string",
  "enabled": true,
  "definition": {
    "nodes": [
      {
        "id": "string",
        "type": "string",
        "label": "string",
        "config": {
          "property1": null,
          "property2": null
        },
        "next": "string",
        "validation": {
          "executor": "validate",
          "config": {
            "property1": null,
            "property2": null
          },
          "mustPass": false,
          "retry": {
            "maxRetries": 3,
            "strategy": "exponential",
            "baseDelayMs": 1000,
            "maxDelayMs": 60000
          }
        },
        "retry": {
          "maxRetries": 3,
          "strategy": "exponential",
          "baseDelayMs": 1000,
          "maxDelayMs": 60000
        },
        "inputs": {
          "property1": "string",
          "property2": "string"
        },
        "inputSchema": {
          "property1": null,
          "property2": null
        },
        "outputSchema": {
          "property1": null,
          "property2": null
        }
      }
    ],
    "onNodeFailure": "fail"
  },
  "triggers": [],
  "cooldown": {
    "hours": 0,
    "minutes": 0,
    "seconds": 0
  },
  "input": {
    "property1": "string",
    "property2": "string"
  },
  "triggerSchema": {
    "property1": null,
    "property2": null
  },
  "dir": "string",
  "vcsRepo": "string",
  "createdByAgentId": "string",
  "createdAt": "string",
  "lastUpdatedAt": "string",
  "createdBy": "string",
  "updatedBy": "string",
  "favorite": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PUT
/api/workflows/{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

curl -X PUT "http://localhost:3013/api/workflows/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "name": "string",
  "description": "string",
  "enabled": true,
  "definition": {
    "nodes": [
      {
        "id": "string",
        "type": "string",
        "label": "string",
        "config": {
          "property1": null,
          "property2": null
        },
        "next": "string",
        "validation": {
          "executor": "validate",
          "config": {
            "property1": null,
            "property2": null
          },
          "mustPass": false,
          "retry": {
            "maxRetries": 3,
            "strategy": "exponential",
            "baseDelayMs": 1000,
            "maxDelayMs": 60000
          }
        },
        "retry": {
          "maxRetries": 3,
          "strategy": "exponential",
          "baseDelayMs": 1000,
          "maxDelayMs": 60000
        },
        "inputs": {
          "property1": "string",
          "property2": "string"
        },
        "inputSchema": {
          "property1": null,
          "property2": null
        },
        "outputSchema": {
          "property1": null,
          "property2": null
        }
      }
    ],
    "onNodeFailure": "fail"
  },
  "triggers": [],
  "cooldown": {
    "hours": 0,
    "minutes": 0,
    "seconds": 0
  },
  "input": {
    "property1": "string",
    "property2": "string"
  },
  "triggerSchema": {
    "property1": null,
    "property2": null
  },
  "dir": "string",
  "vcsRepo": "string",
  "createdByAgentId": "string",
  "createdAt": "string",
  "lastUpdatedAt": "string",
  "createdBy": "string",
  "updatedBy": "string",
  "favorite": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
PATCH
/api/workflows/{id}/nodes/{nodeId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string
nodeId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "http://localhost:3013/api/workflows/string/nodes/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "name": "string",
  "description": "string",
  "enabled": true,
  "definition": {
    "nodes": [
      {
        "id": "string",
        "type": "string",
        "label": "string",
        "config": {
          "property1": null,
          "property2": null
        },
        "next": "string",
        "validation": {
          "executor": "validate",
          "config": {
            "property1": null,
            "property2": null
          },
          "mustPass": false,
          "retry": {
            "maxRetries": 3,
            "strategy": "exponential",
            "baseDelayMs": 1000,
            "maxDelayMs": 60000
          }
        },
        "retry": {
          "maxRetries": 3,
          "strategy": "exponential",
          "baseDelayMs": 1000,
          "maxDelayMs": 60000
        },
        "inputs": {
          "property1": "string",
          "property2": "string"
        },
        "inputSchema": {
          "property1": null,
          "property2": null
        },
        "outputSchema": {
          "property1": null,
          "property2": null
        }
      }
    ],
    "onNodeFailure": "fail"
  },
  "triggers": [],
  "cooldown": {
    "hours": 0,
    "minutes": 0,
    "seconds": 0
  },
  "input": {
    "property1": "string",
    "property2": "string"
  },
  "triggerSchema": {
    "property1": null,
    "property2": null
  },
  "dir": "string",
  "vcsRepo": "string",
  "createdByAgentId": "string",
  "createdAt": "string",
  "lastUpdatedAt": "string",
  "createdBy": "string",
  "updatedBy": "string",
  "favorite": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/workflows/{id}/runs

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string

Query Parameters

status?string
Value in"running" | "waiting" | "completed" | "failed" | "skipped" | "cancelled"
limit?integer
Range1 <= value <= 100
offset?|
Range0 <= value

Response Body

application/json

curl -X GET "http://localhost:3013/api/workflows/string/runs"
[
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
    "status": "running",
    "triggerData": null,
    "context": {
      "property1": null,
      "property2": null
    },
    "error": "string",
    "startedAt": "string",
    "lastUpdatedAt": "string",
    "finishedAt": "string"
  }
]
POST
/api/workflows/{id}/trigger

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

application/json

curl -X POST "http://localhost:3013/api/workflows/string/trigger"
{
  "runId": "string",
  "skipped": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST
/api/workflows/{id}/trigger/validate

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/workflows/string/trigger/validate"
{
  "valid": true,
  "schema": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/workflows/{id}/versions

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/workflows/string/versions"
{
  "versions": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
      "version": 1,
      "snapshot": {
        "name": "string",
        "description": "string",
        "definition": {
          "nodes": [
            {
              "id": "string",
              "type": "string",
              "label": "string",
              "config": {
                "property1": null,
                "property2": null
              },
              "next": "string",
              "validation": {
                "executor": "validate",
                "config": {
                  "property1": null,
                  "property2": null
                },
                "mustPass": false,
                "retry": {
                  "maxRetries": 3,
                  "strategy": "exponential",
                  "baseDelayMs": 1000,
                  "maxDelayMs": 60000
                }
              },
              "retry": {
                "maxRetries": 3,
                "strategy": "exponential",
                "baseDelayMs": 1000,
                "maxDelayMs": 60000
              },
              "inputs": {
                "property1": "string",
                "property2": "string"
              },
              "inputSchema": {
                "property1": null,
                "property2": null
              },
              "outputSchema": {
                "property1": null,
                "property2": null
              }
            }
          ],
          "onNodeFailure": "fail"
        },
        "triggers": [
          {
            "type": "webhook",
            "hmacSecret": "string",
            "hmacHeader": "X-Hub-Signature-256",
            "verification": {
              "format": "hmac-sha256",
              "header": "X-Hub-Signature-256"
            }
          }
        ],
        "cooldown": {
          "hours": 0,
          "minutes": 0,
          "seconds": 0
        },
        "input": {
          "property1": "string",
          "property2": "string"
        },
        "triggerSchema": {
          "property1": null,
          "property2": null
        },
        "dir": "string",
        "vcsRepo": "string",
        "enabled": true
      },
      "changedByAgentId": "string",
      "createdAt": "string"
    }
  ]
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/workflows/{id}/versions/{version}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

id*string
version*integer
Range1 <= value

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/workflows/string/versions/1"
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "workflowId": "43c4fa9b-0cbc-4b57-a121-9d7d46a3eaa4",
  "version": 1,
  "snapshot": {
    "name": "string",
    "description": "string",
    "definition": {
      "nodes": [
        {
          "id": "string",
          "type": "string",
          "label": "string",
          "config": {
            "property1": null,
            "property2": null
          },
          "next": "string",
          "validation": {
            "executor": "validate",
            "config": {
              "property1": null,
              "property2": null
            },
            "mustPass": false,
            "retry": {
              "maxRetries": 3,
              "strategy": "exponential",
              "baseDelayMs": 1000,
              "maxDelayMs": 60000
            }
          },
          "retry": {
            "maxRetries": 3,
            "strategy": "exponential",
            "baseDelayMs": 1000,
            "maxDelayMs": 60000
          },
          "inputs": {
            "property1": "string",
            "property2": "string"
          },
          "inputSchema": {
            "property1": null,
            "property2": null
          },
          "outputSchema": {
            "property1": null,
            "property2": null
          }
        }
      ],
      "onNodeFailure": "fail"
    },
    "triggers": [
      {
        "type": "webhook",
        "hmacSecret": "string",
        "hmacHeader": "X-Hub-Signature-256",
        "verification": {
          "format": "hmac-sha256",
          "header": "X-Hub-Signature-256"
        }
      }
    ],
    "cooldown": {
      "hours": 0,
      "minutes": 0,
      "seconds": 0
    },
    "input": {
      "property1": "string",
      "property2": "string"
    },
    "triggerSchema": {
      "property1": null,
      "property2": null
    },
    "dir": "string",
    "vcsRepo": "string",
    "enabled": true
  },
  "changedByAgentId": "string",
  "createdAt": "string"
}
{
  "error": "string",
  "property1": null,
  "property2": null
}