GET
/
workflow
/
{workflow_id}
/
versions
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "user_id": "123e4567-e89b-12d3-a456-426614174000",
    "result_schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema#",
      "type": "object",
      "required": [
        "submission_id",
        "status"
      ],
      "properties": {
        "submission_id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "success",
            "failure"
          ]
        }
      }
    },
    "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "created_at": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "prompts": [
      "Your name is {{.name}}, you speak {{.language}}",
      "Your task is {{.task}}"
    ],
    "prompt_variables": [
      "name",
      "language",
      "task"
    ],
    "workflow_options": {
      "model": "gpt-4o",
      "version": "2024-02-01"
    },
    "start_url": "https://www.google.com",
    "fields": {
      "model": "gpt-4o",
      "version": "2024-02-01"
    }
  }
]

Path Parameters

workflow_id
string
required

Response

200
application/json
List of workflow versions
id
string
required

Workflow identifier.

user_id
string
required

The ID of the user who created the workflow.

Example:

"123e4567-e89b-12d3-a456-426614174000"

result_schema
object
required

A JSON Schema that defines the expected structure and validation rules for workflow results.

Example:
{
  "$schema": "https://json-schema.org/draft/2020-12/schema#",
  "type": "object",
  "required": ["submission_id", "status"],
  "properties": {
    "submission_id": { "type": "string" },
    "status": {
      "type": "string",
      "enum": ["success", "failure"]
    }
  }
}
agent_id
string
required

Identifier of the associated agent.

name
string
required

Workflow name.

prompts
string[]
required

The prompts for the workflow. They can have variables in them. They will be merged with the dynamic data passed when the workflow is executed.

Example:
[
  "Your name is {{.name}}, you speak {{.language}}",
  "Your task is {{.task}}"
]
start_url
string
required

The URL to start the workflow.

Example:

"https://www.google.com"

created_at
string

The date and time the workflow was created.

prompt_variables
string[]

The variables in the prompts.

Example:
["name", "language", "task"]
workflow_options
object

Additional options for the workflow. See documentation for more details.

Example:
{
  "model": "gpt-4o",
  "version": "2024-02-01"
}
fields
object

JSON object containing static workflow configuration (e.g. a prompt_template).

Example:
{
  "model": "gpt-4o",
  "version": "2024-02-01"
}