Create Workflow From Task

Create a workflow from an existing agent task's recorded history. This endpoint creates a workflow by using the browser-use rerun history feature. The task must have completed with history stored in S3. The workflow creation process: 1. Creates a new workflow record in pending state 2. Triggers an Inngest event to process the task history 3. The Inngest handler downloads history, detects variables, and updates the workflow Use GET /workflows/{workflow_id} to poll for creation completion.

Authentication

X-Browser-Use-API-Keystring
API Key authentication via header

Request

This endpoint expects an object.
namestringRequired1-200 characters
Name for the new workflow
taskIdstringRequiredformat: "uuid"
ID of the agent task to create workflow from
sessionIdstringRequiredformat: "uuid"
ID of the agent session containing the task
descriptionstring or nullOptional<=5000 characters
Optional description for the workflow

Response

Successful Response
workflowIdstringformat: "uuid"
ID of the newly created workflow
statusstring or nullDefaults to pending

Status of the workflow creation (pending, completed)

messagestring or nullDefaults to Workflow creation started. Variables will be detected from the task history.

Human-readable message about the creation

Errors