Skip to main content

What is a Workflow?

Our browser agent executes workflows, containers for all the context needed to automate a business process reliably. A workflow:
  • Accepts JSON input variables to parameterize each run (e.g., patient name, service dates)
  • Uses encrypted credentials from your Vault for secure authentication. Never hardcode passwords
  • Performs browser actions like clicking elements, entering text, selecting options, and navigating pages
  • Extracts structured JSON output from web pages using AI or static selectors
  • Handles complex logic including conditionals, loops, file downloads, and two-factor authentication

Build the Workflow

Here’s how you can build your first workflow:
  1. Navigate to your workflows page and hit “New Workflow”.
  2. Build the workflow by chatting with our builder agent. The agent will suggest variables to parameterize your workflow and make it reusable.
  3. Test the workflow using the Playground (see below). Make edits with our workflow editor.
Check out this video for a quick walkthrough:

Test with the Playground

Before deploying to production, test your workflow in the Playground:
  1. Select your workflow from the dropdown
  2. Select a user from your Vault if the workflow required authentication
  3. Fill in input variables with test values
  4. Start the run and watch the browser agent execute in real-time
Store all credentials in your Vault instead of hardcoding them. The Vault encrypts sensitive data and makes credentials reusable across workflows.

Run the Browser Agent

Now that you have built the initial context, you can trigger the browser agent over our API. Note that the run_input_variables were automatically generated by the builder agent including a full JSON schema.
import { CloudCruise } from 'cloudcruise';

const client = new CloudCruise({
  apiKey: "your-api-key",
  encryptionKey: "your-encryption-key",
});

const run = await client.runs.start({
  workflow_id: "<workflow-id>",
  run_input_variables: {
    first_name: "John",
    last_name: "Doe",
  },
});

// Listen for events
run.on('end', ({ type }) => {
  console.log(`Run completed with status: ${type}`);
  run.close();
});

// Or wait for completion
const result = await run.wait();
console.log("Output:", result.data);
For detailed SDK documentation, see the TypeScript SDK and Python SDK guides.