Donobu API (3.19.1)

Download OpenAPI specification:

The Donobu API provides a comprehensive suite of endpoints for automating web browser interactions through AI-driven and deterministic flows. A flow is Donobu's core resource: it represents a sequence of browser actions executed against a target website, driven by an AI agent, explicit user instructions, or a predetermined script.

Key Capabilities

  • Flow Management — Create, monitor, query, rename, and delete automation flows.
  • AI-Powered Automation — Leverage large language models (via configurable GPT configurations) to autonomously navigate websites and accomplish high-level objectives.
  • Deterministic Replay — Re-run previously recorded flows exactly as they occurred, or export them as Playwright test scripts for integration into CI/CD pipelines.
  • Tool Call Inspection — Retrieve the full chronological history of actions taken during a flow, including parameters, outcomes, timing, and screenshots.
  • Media Retrieval — Access screenshots and video recordings captured during flow execution.
  • Configuration Management — Manage GPT provider configurations, agent-to-configuration mappings, and environment variables consumed by flows.
  • Tool Discovery — Query the set of browser automation tools available in the Donobu runtime.

Run Modes

Flows operate in one of three execution modes:

Mode Description
AUTONOMOUS An AI agent decides what actions to take based on the overall objective. Requires a GPT configuration.
INSTRUCT The flow waits for explicit user-submitted tool calls at each step. No GPT configuration required.
DETERMINISTIC The flow executes a fixed sequence of tool calls provided at creation time. No AI decision-making.

Flow Lifecycle

A flow transitions through the following states:

UNSTARTEDINITIALIZING → (RUNNING_ACTIONQUERYING_LLM_FOR_NEXT_ACTION | WAITING_ON_USER_FOR_NEXT_ACTION) → SUCCESS or FAILED

Flows may also be PAUSED and later RESUMING during execution.

Getting Started

  1. Configure a GPT provider via POST /api/gpt-configs/{name} (required for AUTONOMOUS mode).
  2. Assign the configuration to an agent via POST /api/agents/{name}.
  3. Create a flow via POST /api/flows with a targetWebsite and overallObjective.
  4. Poll the flow via GET /api/flows/{flowId} until it reaches a terminal state (SUCCESS or FAILED).
  5. Inspect results via tool calls, screenshots, video, or the flow's result field.

flows

Create, manage, query, and inspect automation flows. Flows are the core resource in Donobu — each flow represents a sequence of browser actions executed against a target website to achieve an objective.

List flows

Retrieves a paginated list of flows with optional filtering. Results are ordered by startedAt in descending order (newest first). Use the nextPageToken from the response to fetch subsequent pages.

query Parameters
name
string

Filter by exact flow name match.

startedAfter
number

Include only flows whose startedAt is greater than or equal to this value. Unix epoch timestamp in milliseconds.

startedBefore
number

Include only flows whose startedAt is less than or equal to this value. Unix epoch timestamp in milliseconds.

runMode
string (RunMode)
Enum: "AUTONOMOUS" "INSTRUCT" "DETERMINISTIC"

Filter by execution mode.

state
string (FlowState)
Enum: "UNSTARTED" "INITIALIZING" "QUERYING_LLM_FOR_NEXT_ACTION" "WAITING_ON_USER_FOR_NEXT_ACTION" "PAUSED" "RESUMING" "RUNNING_ACTION" "FAILED" "SUCCESS"

Filter by current flow state.

limit
integer [ 1 .. 100 ]

Maximum number of flows to return per page. Valid range is 1–100.

pageToken
string

Opaque pagination token returned in a previous response's nextPageToken field. Pass it as-is to retrieve the next page of results.

Responses

Response samples

Content type
application/json
{
  • "flows": [
    ],
  • "nextPageToken": "string"
}

Create a flow

Creates and starts a new Donobu flow. The flow begins executing asynchronously after creation. Poll GET /api/flows/{flowId} to track progress.

At a minimum, targetWebsite is required. For AUTONOMOUS mode, an overallObjective and a valid GPT configuration (either via the default agent or gptConfigNameOverride) are also required.

Request Body schema: application/json
required
name
string or null <= 256 characters

An optional display name for the flow. Must be fewer than 256 characters.

object or null

Browser configuration for the flow. If omitted, a default local Chromium browser is used.

envVars
Array of strings or null

Names of environment variables (previously stored via /api/env) to make available to the flow.

Array of objects or null (CustomTool)

Custom user-defined tools to make available during the flow.

defaultMessageDuration
number or null

Default duration (in milliseconds) for in-browser messages from the flow agent.

callbackUrl
string or null

A URL to receive an HTTP POST when the flow completes. The POST body will contain { "id": "<flowId>" }.

targetWebsite
required
string

The website URL to navigate to when starting the flow.

overallObjective
string or null

The high-level objective for the flow to accomplish. Required when initialRunMode is AUTONOMOUS; may be omitted for INSTRUCT or DETERMINISTIC modes.

allowedTools
Array of strings or null

An explicit list of tool names the flow is permitted to use. If omitted, the default tool set is used.

resultJsonSchema
any or null

A JSON Schema defining the expected structure of the flow's result. When specified, Donobu will attempt to extract a conforming result object upon flow completion.

maxToolCalls
number or null

The maximum number of tool calls the flow may execute. Only used when initialRunMode is AUTONOMOUS.

videoDisabled
boolean or null

If true, disables video recording for the flow. Useful for long-running flows.

gptConfigNameOverride
string or null

The name of a specific GPT configuration to use instead of the agent's default. If the configuration does not exist, the default agent configuration is used.

initialRunMode
string or null
Enum: "AUTONOMOUS" "INSTRUCT" "DETERMINISTIC"

The execution mode for the flow. If omitted, defaults to AUTONOMOUS.

isControlPanelEnabled
boolean or null

If true, enables the in-browser control panel overlay. Ignored when the browser is running in headless mode.

Array of objects or null (ProposedToolCall)

An ordered list of tool calls to execute immediately when the flow starts. Commonly used with DETERMINISTIC mode for replaying recorded flows.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "browser": {
    },
  • "envVars": [
    ],
  • "customTools": [
    ],
  • "defaultMessageDuration": 0,
  • "callbackUrl": "string",
  • "targetWebsite": "string",
  • "overallObjective": "string",
  • "allowedTools": [
    ],
  • "resultJsonSchema": null,
  • "maxToolCalls": 0,
  • "videoDisabled": true,
  • "gptConfigNameOverride": "string",
  • "initialRunMode": "AUTONOMOUS",
  • "isControlPanelEnabled": true,
  • "toolCallsOnStart": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "createdWithDonobuVersion": "string",
  • "browser": {
    },
  • "envVars": [
    ],
  • "gptConfigName": "string",
  • "hasGptConfigNameOverride": true,
  • "customTools": [
    ],
  • "defaultMessageDuration": 0,
  • "runMode": "AUTONOMOUS",
  • "isControlPanelEnabled": true,
  • "callbackUrl": "string",
  • "targetWebsite": "string",
  • "overallObjective": "string",
  • "allowedTools": [
    ],
  • "resultJsonSchema": null,
  • "result": { },
  • "inputTokensUsed": 0,
  • "completionTokensUsed": 0,
  • "maxToolCalls": 0,
  • "startedAt": 0,
  • "completedAt": 0,
  • "state": "UNSTARTED",
  • "nextState": "UNSTARTED",
  • "videoDisabled": true
}

Get a flow

Retrieves the complete metadata for a specific flow, including its current state, configuration, execution statistics, and result.

path Parameters
flowId
required
string

The unique identifier of the flow.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "createdWithDonobuVersion": "string",
  • "browser": {
    },
  • "envVars": [
    ],
  • "gptConfigName": "string",
  • "hasGptConfigNameOverride": true,
  • "customTools": [
    ],
  • "defaultMessageDuration": 0,
  • "runMode": "AUTONOMOUS",
  • "isControlPanelEnabled": true,
  • "callbackUrl": "string",
  • "targetWebsite": "string",
  • "overallObjective": "string",
  • "allowedTools": [
    ],
  • "resultJsonSchema": null,
  • "result": { },
  • "inputTokensUsed": 0,
  • "completionTokensUsed": 0,
  • "maxToolCalls": 0,
  • "startedAt": 0,
  • "completedAt": 0,
  • "state": "UNSTARTED",
  • "nextState": "UNSTARTED",
  • "videoDisabled": true
}

Delete a flow

Permanently deletes a flow and all associated data, including metadata, tool calls, screenshots, and video recordings. This operation cannot be undone.

A flow that is currently running cannot be deleted; cancel it first.

path Parameters
flowId
required
string

The unique identifier of the flow.

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string"
}

Rename a flow

Updates the display name of an existing flow.

path Parameters
flowId
required
string

The unique identifier of the flow.

Request Body schema: application/json
required
name
required
string

The new name for the flow.

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "createdWithDonobuVersion": "string",
  • "browser": {
    },
  • "envVars": [
    ],
  • "gptConfigName": "string",
  • "hasGptConfigNameOverride": true,
  • "customTools": [
    ],
  • "defaultMessageDuration": 0,
  • "runMode": "AUTONOMOUS",
  • "isControlPanelEnabled": true,
  • "callbackUrl": "string",
  • "targetWebsite": "string",
  • "overallObjective": "string",
  • "allowedTools": [
    ],
  • "resultJsonSchema": null,
  • "result": { },
  • "inputTokensUsed": 0,
  • "completionTokensUsed": 0,
  • "maxToolCalls": 0,
  • "startedAt": 0,
  • "completedAt": 0,
  • "state": "UNSTARTED",
  • "nextState": "UNSTARTED",
  • "videoDisabled": true
}

Get flow as rerun payload

Converts a completed flow into a CreateFlowRequest payload suitable for deterministic replay. The returned object includes the original tool calls configured for sequential re-execution and can be submitted directly to POST /api/flows.

path Parameters
flowId
required
string

The unique identifier of the flow.

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "browser": {
    },
  • "envVars": [
    ],
  • "customTools": [
    ],
  • "defaultMessageDuration": 0,
  • "callbackUrl": "string",
  • "targetWebsite": "string",
  • "overallObjective": "string",
  • "allowedTools": [
    ],
  • "resultJsonSchema": null,
  • "maxToolCalls": 0,
  • "videoDisabled": true,
  • "gptConfigNameOverride": "string",
  • "initialRunMode": "AUTONOMOUS",
  • "isControlPanelEnabled": true,
  • "toolCallsOnStart": [
    ]
}

Generate Playwright code for a flow

Generates a Playwright test script that replays the actions of a completed flow. The generated code uses the Donobu Playwright extension and can be executed independently as part of a test suite.

path Parameters
flowId
required
string

The unique identifier of the flow.

query Parameters
areElementIdsVolatile
boolean

If true, ID-only selectors (e.g. #submit-btn) are dropped because the element's id attribute is considered volatile. When every candidate selector is ID-based, the list is left unchanged.

disableSelectorFailover
boolean

If true, only the first (most specific) selector is used, disabling automatic fail-over to broader selectors.

disableSelfHealingTests
boolean

If true, disables self-healing test behavior where selectors are automatically updated on mismatch.

disablePullRequestCreation
boolean

If true, disables automatic pull request creation for tests that have self-healed.

runInHeadedMode
boolean

If true, the generated test runs with a visible browser window instead of headless mode. Useful for debugging and demos.

slowMotionDelay
number >= 0

Delay in milliseconds between actions in the generated test. Set to 0 to disable. Useful for debugging and demos.

playwrightScriptVariant
string
Enum: "ai" "classic"

Choose whether the generated test uses page.ai() calls (ai) or classic tool-by-tool Playwright API calls (classic).

Responses

Response samples

Content type
application/json
{
  • "script": "string"
}

Generate a Playwright project for multiple flows

Generates a complete Playwright project structure containing test files for one or more flows, along with configuration and dependency files. The resulting project can be written to disk and executed directly with Playwright.

Request Body schema: application/json
required
flowIds
required
Array of strings

The IDs of flows to include in the project.

object (CodeGenerationOptions)

Options that control how Playwright test code is generated.

Responses

Request samples

Content type
application/json
{
  • "flowIds": [
    ],
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "files": [
    ]
}

List tool calls for a flow

Retrieves the complete chronological history of tool calls executed within a flow. Each tool call includes the action name, input parameters, outcome, timing, the page URL at the time of execution, and a reference to a post-call screenshot (if available).

path Parameters
flowId
required
string

The unique identifier of the flow.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Propose a tool call

Submits a tool call for execution in an active flow. This is primarily used during INSTRUCT mode to direct the flow's next action. The proposed tool call is validated and queued; execution happens asynchronously.

The target flow must be actively running and the tool name must correspond to a valid, available tool whose parameters conform to its expected schema.

path Parameters
flowId
required
string

The unique identifier of the flow.

Request Body schema: application/json
required
name
required
string

The name of the tool to call. Must match a tool from GET /api/tools.

required
object

The input parameters for the tool. Must conform to the tool's input JSON Schema.

toolCallId
string or null

An optional identifier used to correlate proposed tool calls with their results.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "parameters": { },
  • "toolCallId": "string"
}

Response samples

Content type
application/json
{
  • "code": "INVALID_PARAM_VALUES",
  • "errors": [
    ]
}

Get a specific tool call

Retrieves detailed information about a single tool call within a flow, including its input parameters, outcome, timing, and associated metadata.

path Parameters
flowId
required
string

The unique identifier of the flow.

toolCallId
required
string

The unique identifier of the tool call.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "toolName": "string",
  • "parameters": { },
  • "outcome": {
    },
  • "postCallImageId": "string",
  • "page": "string",
  • "startedAt": 0,
  • "completedAt": 0
}

Get a flow screenshot

Retrieves a screenshot image captured during flow execution. The response is the raw image binary in PNG or JPEG format.

path Parameters
flowId
required
string

The unique identifier of the flow.

imageId
required
string

The unique identifier of the image. Corresponds to a tool call's postCallImageId.

Responses

Get a flow video recording

Retrieves the video recording of a flow execution in WebM format. Supports HTTP range requests for efficient streaming and seeking.

To stream the video, send a Range header (e.g. Range: bytes=0-1048575). The server will respond with 206 Partial Content and the requested byte range.

path Parameters
flowId
required
string

The unique identifier of the flow.

header Parameters
Range
string

Standard HTTP range header for partial content requests (e.g. bytes=0-1048575).

Responses

Get browser state for a flow

Retrieves the persisted browser storage state for a flow. This includes cookies, localStorage, and sessionStorage data captured from the browser context. The state is only available if the flow was configured with browser.persistState: true.

path Parameters
flowId
required
string

The unique identifier of the flow.

Responses

Response samples

Content type
application/json
{
  • "cookies": [
    ],
  • "origins": [
    ]
}

tools

Discover the browser automation tools available in the Donobu runtime. Tools represent individual actions (e.g., clicking, typing, navigating) that can be invoked during flow execution.

List available tools

Returns the set of browser automation tools available for use within flows. Each tool includes its name, description, input JSON Schema, and whether it requires a GPT configuration to operate.

Use tool names from this list when specifying allowedTools or toolCallsOnStart in a CreateFlowRequest, or when proposing tool calls via POST /api/flows/{flowId}/tool-calls.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

agents

Manage the mapping between Donobu agents and GPT configurations. Agents are the AI decision-makers that drive autonomous flows; each agent is linked to a specific GPT configuration that determines which model and provider it uses.

List all agent mappings

Retrieves a mapping of all Donobu agents to their assigned GPT configuration names. Agents without an assigned configuration will have a null value.

Responses

Response samples

Content type
application/json
{
  • "flow-runner": "my-anthropic-config"
}

Get an agent's configuration

Retrieves the GPT configuration name currently assigned to a specific agent.

path Parameters
name
required
string
Value: "flow-runner"

The agent name. Currently only flow-runner is supported.

Responses

Response samples

Content type
application/json
{
  • "gptConfigName": "string"
}

Set an agent's configuration

Assigns a GPT configuration to a specific agent. The referenced GPT configuration must already exist. Setting gptConfigName to null unlinks the agent from any configuration, which will prevent it from being used in autonomous flows.

path Parameters
name
required
string
Value: "flow-runner"

The agent name. Currently only flow-runner is supported.

Request Body schema: application/json
required
gptConfigName
required
string or null

The name of the GPT configuration to assign, or null to unlink.

Responses

Request samples

Content type
application/json
{
  • "gptConfigName": "string"
}

Response samples

Content type
application/json
{
  • "gptConfigName": "string"
}

configs

Manage GPT provider configurations and environment variables. GPT configurations define connection parameters and model settings for AI providers (Anthropic, OpenAI, Google, etc.). Environment variables provide key-value data accessible to flows at runtime.

List all GPT configurations

Retrieves all stored GPT configurations. Sensitive fields such as API keys and secret access keys are automatically redacted in the response.

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Get a GPT configuration

Retrieves a specific GPT configuration by name. Sensitive fields are automatically redacted.

path Parameters
name
required
string [ 1 .. 100 ] characters ^[a-zA-Z0-9_ -]+$

The name of the GPT configuration. Must be 1–100 characters and contain only alphanumeric characters, spaces, underscores, and hyphens.

Responses

Response samples

Content type
application/json
Example
{
  • "type": "ANTHROPIC",
  • "apiKey": "string",
  • "modelName": "string"
}

Create or update a GPT configuration

Creates or updates a GPT configuration. The configuration is validated against the provider's requirements and a test request is made to verify connectivity and authentication before the configuration is saved.

Sensitive fields are redacted in the response — the original credentials are securely stored but never returned.

path Parameters
name
required
string [ 1 .. 100 ] characters ^[a-zA-Z0-9_ -]+$

The name of the GPT configuration. Must be 1–100 characters and contain only alphanumeric characters, spaces, underscores, and hyphens.

Request Body schema: application/json
required
type
required
string

Identifies this as an Anthropic configuration.

apiKey
required
string

The Anthropic API key. Redacted in responses.

modelName
required
string

The Anthropic model to use (e.g. claude-sonnet-4-20250514).

Responses

Request samples

Content type
application/json
Example
{
  • "type": "ANTHROPIC",
  • "apiKey": "string",
  • "modelName": "string"
}

Response samples

Content type
application/json
Example
{
  • "type": "ANTHROPIC",
  • "apiKey": "string",
  • "modelName": "string"
}

Delete a GPT configuration

Permanently deletes a GPT configuration. Any agents that reference this configuration are automatically unlinked (their gptConfigName is set to null).

path Parameters
name
required
string [ 1 .. 100 ] characters ^[a-zA-Z0-9_ -]+$

The name of the GPT configuration. Must be 1–100 characters and contain only alphanumeric characters, spaces, underscores, and hyphens.

Responses

Response samples

Content type
application/json
{ }

List all environment data

Retrieves all environment key-value pairs that are available for use by flows.

Responses

Response samples

Content type
application/json
{
  • "property1": "string",
  • "property2": "string"
}

Get an environment datum

Retrieves a single environment datum by its key.

path Parameters
key
required
string

The environment variable name.

Responses

Response samples

Content type
application/json
{
  • "key": "string",
  • "value": "string"
}

Create or update an environment datum

Creates a new environment datum or updates the value of an existing one.

path Parameters
key
required
string

The environment variable name.

Request Body schema: application/json
required
value
required
string

The value to set for the environment datum.

Responses

Request samples

Content type
application/json
{
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "key": "string",
  • "value": "string"
}

Delete an environment datum

Permanently removes an environment datum by its key.

path Parameters
key
required
string

The environment variable name.

Responses

system

System-level endpoints for health checks and API documentation retrieval.

Health check

A lightweight endpoint that returns HTTP 200 to confirm the server is running and accepting requests.

Responses

Get OpenAPI schema

Returns the OpenAPI specification for the Donobu API. The response format depends on the Accept header: text/html returns an interactive HTML documentation page, otherwise the raw YAML specification is returned.

header Parameters
Accept
string

Set to text/html to receive an interactive HTML documentation page. Otherwise, the raw YAML specification is returned.

Responses