POST
/
workflow
/
{agent_name}
/
create
"123e4567-e89b-12d3-a456-426614174000"

Path Parameters

agent_name
string
required

Body

application/json
name
string
required

The name of the workflow.

Example:

"My workflow"

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 task is to fill in the form with {{.data}} then click submit"
]
provider
enum<string>
required

The Language Model Provider for the Workflow

Available options:
openai,
anthropic
Example:

"openai"

start_url
string
required

The URL to start the workflow.

Example:

"https://www.google.com"

user_id
string

Used to assign the workflow to a user. Do not use this field.

Example:

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

result_schema
object

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"]
    }
  }
}
fields
object

Field for custom configuration. Do not use.

workflow_options
object

Optional workflow configuration options. All fields are optional and will use defaults if not specified.

Response

201
application/json
Workflow created successfully

The ID of the workflow

Example:

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