> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudcruise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Build & Run

## 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](/concepts/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](https://app.cloudcruise.com/workflows) and hit "New Workflow".
2. Build the workflow by chatting with our [builder agent](/concepts/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](/concepts/workflow-dsl/overview).

Check out this video for a quick walkthrough:

<iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/0ggfJ0Q2Szs?si=_uzzuA8mUURUhjKP" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />

## Test with the Playground

Before deploying to production, test your workflow in the [Playground](https://app.cloudcruise.com/newRun):

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

<Tip>
  Store all credentials in your [Vault](/concepts/vault) instead of hardcoding them. The Vault encrypts sensitive data and makes credentials reusable across workflows.
</Tip>

## 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.

<CodeGroup>
  ```typescript TypeScript theme={null}
  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);
  ```

  ```python Python theme={null}
  from cloudcruise import CloudCruise, CloudCruiseParams, StartRunRequest

  client = CloudCruise(
      CloudCruiseParams(
          api_key="your-api-key",
          encryption_key="your-encryption-key",
      )
  )

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

  # Listen for events
  run.on("end", lambda info: print(f"Run completed with status: {info.get('type')}"))

  # Or wait for completion
  result = run.wait()
  print("Output:", result.get("data"))
  ```

  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.cloudcruise.com/run \
    --header 'Content-Type: application/json' \
    --header 'cc-key: <your-api-key>' \
    --data '{
    "workflow_id": "<workflow-id>",
    "run_input_variables": {
      "first_name": "John",
      "last_name": "Doe"
    }
  }'
  ```
</CodeGroup>

For detailed SDK documentation, see the [TypeScript SDK](/sdk/js/overview) and [Python SDK](/sdk/python/overview) guides.
