Skip to content

Agentic Workflows

Declarative, multi-step tasks that chain AI, tools, the Builder, and browser automation (Playwright + Chrome DevTools) — with verification and audit logs.

Overview

A workflow is a JSON spec with ordered steps. Each step runs a capability and can pass its output to later steps. Runs are persisted with a per-step log so you can audit or replay them. Run workflows from the Workflows page, the CLI (wf run), or the REST API.

Anatomy of a workflow

workflow spec
{
  "id": "meeting-to-actions",
  "title": "Turn a meeting into actions",
  "inputs": { "notes": { "type": "string", "required": true } },
  "steps": [
    { "id": "summarise", "type": "ai", "capability": "ai:chat",
      "with": { "prompt": "Summarise these notes into actions:\n{{inputs.notes}}" } },
    { "id": "save", "type": "file", "capability": "file:create",
      "with": { "file_name": "meeting-actions", "format": "pdf",
                "content": "{{steps.summarise.output.text}}" } }
  ],
  "outputs": ["save"]
}

Interpolation uses {{inputs.x}} and {{steps.<id>.output...}}. Steps declare an error policy with on_error: stop (default),continue, or retry(n).

Step types

TypePurpose
aiCall the platform AI (draft, summarise, extract)
toolInvoke a product tool (convert, video, image…)
builderCreate a builder record (guide, Q&A, prompt…)
httpOutbound HTTP request (domain allow-list enforced)
browserDrive headless Chromium via Playwright
fileCreate a verified file (md / pdf / docx)
dataCharts / visualisations from data
notifyNotify the user in-app
branchConditional logic
wait_for_humanPause for approval, then resume

Browser automation

The browser step runs a list of actions in headless Chromium and returns results plus evidence (screenshots, console errors, failed requests).

browser actions
{
  "id": "check", "type": "browser", "capability": "browser:run",
  "with": { "actions": [
    { "action": "goto", "url": "https://example.com" },
    { "action": "wait_for", "selector": "h1" },
    { "action": "extract", "selector": "h1", "as": "text" },
    { "action": "extract_table", "selector": "table" },
    { "action": "assert_text", "selector": "body", "contains": "Welcome" },
    { "action": "screenshot", "fullPage": true },
    { "action": "pdf", "path": "/tmp/page.pdf" }
  ] }
}
ActionDescription
gotoNavigate to a URL
clickClick an element
typeFill an input
selectChoose an option
extractRead text/html/attribute
extract_tableRead a table into rows
assert_textAssert the page contains text
screenshotCapture a PNG
recordRecord a short clip
pdfExport the page to PDF

Only allow-listed domains can be visited (env WORKFLOW_BROWSER_ALLOWLIST).

Capabilities

Registered capability names (usable via a step's capability field):

ai:chat · ai:image · file:create · file:convert · builder:create
browser:run · http · notify:chat · data:visualization
tool:convert · tool:video:info

Running from the API / CLI

REST
GET  /api/v2/workflows/                 # catalogue
GET  /api/v2/workflows/{id}/            # spec
POST /api/v2/workflows/{id}/run/        # run  { "inputs": {...}, "dry_run": false }
GET  /api/v2/workflows/runs/            # recent runs
GET  /api/v2/workflows/runs/{run_id}/   # step log
CLI
cli-anything-thinkflyflow wf list
cli-anything-thinkflyflow wf run weekly-report --input "brief=Shipped X; no blockers"
cli-anything-thinkflyflow wf runs
cli-anything-thinkflyflow wf log <run_id>

Safety & permissions

ControlBehaviour
Domain allow-listBrowser and HTTP steps can only reach approved hosts
Dry-runSimulates steps with no side effects
Human checkpointswait_for_human pauses the run until approved
VerificationFile steps verify the artefact exists before reporting success
AuditEvery run is logged with per-step status and artefacts
No paymentsWorkflows never perform financial transactions