Skip to main content
We support recording actions with variables and expose primitives such that you can directly integrate the interactive browser to your customer facing dashboard. Simplex’s interactive browser is in early beta. Contact us on Slack if you’d like access.

Step-by-step guide

  • TypeScript SDK
1

Create a new workflow

// Create a new workflow instance
const session = await client.workflows.createWorkflowSession(
  'browser-recorder-test',
  'https://www.simplex.sh/KSolve-bjOkqeAqcAUBEoCiNPX6UAS5UYurs1o3.html',
  {
    proxies: false
  }
);

console.log('VNC URL:', session.vnc_url);
console.log('Livestream URL:', session.livestream_url);
2

Capture actions

Navigate to the Livestream URL from the newly created workflow. This takes you to the created session where you can interact with the browser to record actions.
const startResult = await client.workflows.startSegment(
  session.workflow_id,
  'record-actions'
);

// Start capture mode to actually record actions
await client.workflows.startCapture(session.session_id);
Capture actions in the browser

Capture actions in the browser

3

Stop capture and close session

Stop capturing and close the segment. This will automatically store the recorded actions to the workflow. Segments are just used to separate sections in a workflow and also return the actions we have just captured.
await client.workflows.stopCapture(session.session_id);
const finishResult = await client.workflows.finishSegment(session.workflow_id);

// Log captured actions if available
if (finishResult.segment_actions && finishResult.segment_actions.length > 0) {
console.log('\nCaptured actions: ', finishResult.segment_actions);
} else {
console.log('No segment actions captured or returned.');
}

await client.workflows.closeWorkflowSession(session.session_id);
[
  {
    "params": {
      "task": "Click on The table row with name INV-757356 4/22/25 $33437.51 (first) in the element with selector div span.",
      "max_steps": 20
    },
    "function": "agentic"
  },
  {
    "params": {
      "task": "Click on The button with name Download PDF.",
      "max_steps": 20
    },
    "function": "agentic"
  }
]
4

Replay workflow

const result = await client.workflows.run(workflowId)

console.log('Session created:', workflow.sessionId);
console.log('Workflow ID:', workflow.workflowId);
console.log('Livestream URL:', workflow.livestreamUrl);