Skip to main content
This guide will walk you through creating your first workflow, installing Cyberdriver, and executing a run programmatically.

Prerequisites

  • An active Cyberdesk subscription (if you’re not on a paid plan, book a demo)
  • A Cyberdesk account (sign up here)
  • Node.js 14+ or Python 3.10+ for SDK usage
  • Windows machine for desktop automation

Step 1: Create a workflow in the dashboard

Workflows define the tasks you want to automate. Let’s create your first one.
1

Navigate to Workflows

Go to the Cyberdesk Dashboard and click on Workflows in the sidebar.
2

Create a new workflow

Click the New Workflow button to open the workflow editor.
3

Define your workflow

Fill in the workflow details:
  • Name (optional): Give your workflow a descriptive name like “Extract Patient Data”
  • Main Prompt: This is the instruction that tells AI what to do. For example:
    Navigate to the patient portal and extract the demographics information
    for patient ID: {patient_id}. Look for patient name {patient_first_name}
    {patient_last_name} to confirm you have the right record.
    
    You can also add images to the prompt from the dashboard editor (click Add Image). Images help the agent understand tricky icons and UI elements in legacy apps.
  • Input Schema (optional): Define expected run inputs with JSON Schema. This validates the merged run payload (input_values + sensitive_input_values + machine/session values) before execution. In input_schema, sensitive root keys use a $ prefix (for example, "$api_key").
  • Output Schema (optional): Define the structure of data you want back using JSON Schema
Variables in Workflows:
  • Use {variable_name} for input variables - values you pass when starting the workflow
  • Use {{runtime_variable}} for runtime variables - values discovered and set during execution by focused_action
  • Use {$variable} for sensitive variables - pass values at run creation via sensitive_input_values. Sensitive values are stored in a secure vault during the run, never logged or sent to LLMs, resolved only during actual computer actions, and deleted immediately after the run completes.
Example: "Search for {patient_name} and save their ID as {{patient_id}} for later use"
AI Assist Feature: Instead of writing prompts manually, you can use our AI assist feature:
  1. Type a natural language description of what you want to automate
  2. Click Apply
  3. AI will create a detailed prompt for you
  4. You can send follow-up instructions to refine the prompt - AI uses the current field contents as context
The same AI assist is available for both Input Schema and Output Schema fields to help you define JSON schemas quickly.
4

Save your workflow

Click Create Workflow to save. You’ll be redirected to the workflow details page where you can find your workflow ID.

Step 2: Install Cyberdriver

Cyberdriver connects your desktop to Cyberdesk, enabling remote automation.
Cyberdriver will automatically request administrator privileges when it runs. Make sure you have the necessary permissions or administrator password available, as this is required for automating certain desktop applications.
1

Run the installer in PowerShell

# Create tool directory
$toolDir = "$env:USERPROFILE\.cyberdriver"
New-Item -ItemType Directory -Force -Path $toolDir

# Download cyberdriver

try {
    Invoke-WebRequest -Uri "https://github.com/cyberdesk-hq/cyberdriver/releases/download/v0.0.41/cyberdriver.exe" -OutFile "$toolDir\cyberdriver.exe" -ErrorAction Stop
} catch {
    Write-Host "ERROR: Failed to download Cyberdriver. If Cyberdriver is already running, run 'cyberdriver stop' first. Otherwise, check your internet connection and try again." -ForegroundColor Red
    return
}

# Verify installation

if (Test-Path "$toolDir\cyberdriver.exe") {
    $fileSize = (Get-Item "$toolDir\cyberdriver.exe").Length
if ($fileSize -gt 34MB) {
        # Add to PATH if not already there
        $userPath = [Environment]::GetEnvironmentVariable("Path", "User")
        if ($userPath -notlike "_$toolDir_") {
[Environment]::SetEnvironmentVariable("Path", $userPath + ";" + $toolDir, "User")
}
Write-Host "Cyberdriver installed successfully! You may need to restart your terminal for PATH changes to take effect."
} else {
Write-Host "ERROR: Download appears incomplete (file too small). Please try again." -ForegroundColor Red
}
} else {
Write-Host "ERROR: Download failed. Please try again." -ForegroundColor Red
}

2

Restart PowerShell

Close and reopen your PowerShell terminal for the PATH changes to take effect.
3

Connect to Cyberdesk

cyberdriver join --secret YOUR_API_KEY
Replace YOUR_API_KEY with your actual API key from the Cyberdesk Dashboard.
After connecting, find your machine in the dashboard and give it a readable name (like “John’s Desktop” or “Dev Machine”) to easily identify it later.

Step 3: Create a run via SDK

Now let’s execute your workflow programmatically using the SDK.
1

Install the SDK

npm install cyberdesk
2

Create and run your workflow

import { createCyberdeskClient } from 'cyberdesk';

async function runWorkflow() {
  const client = createCyberdeskClient('YOUR_API_KEY');

  const { data: run, error } = await client.runs.create({
    workflow_id: 'your-workflow-id', // From Step 1
    machine_id: 'your-machine-id', // Optional: omit to auto-select an available machine
    input_values: {
      patient_id: '12345',
      patient_first_name: 'John',
      patient_last_name: 'Doe'
    }
  });

  if (error || !run) {
    console.error('Failed to create run:', error);
    return;
  }

  console.log('Run created:', run.id);

  let currentRun = run;
  while (currentRun.status === 'scheduling' || currentRun.status === 'running') {
    await new Promise((resolve) => setTimeout(resolve, 5000));
    const { data: updatedRun, error: refreshError } = await client.runs.get(currentRun.id);
    if (refreshError || !updatedRun) {
      console.error('Failed to refresh run:', refreshError);
      return;
    }
    currentRun = updatedRun;
    console.log('Status:', currentRun.status);
  }

  if (currentRun.status === 'success') {
    console.log('Results:', currentRun.output_data);
  } else {
    console.error('Run failed:', currentRun.error?.join(', '));
  }
}

runWorkflow();

If your workflow defines an Input Schema and provided inputs do not match, the API returns a 422 validation error with path-level details so you can fix the payload before retrying.

Step 4: View results in the dashboard

After your run completes, you can view detailed information in the dashboard.
1

Navigate to Runs

Go to the Runs page in your dashboard.
2

View run details

Click on your run to see:
  • Status: Current state of the run
  • Output Data: The extracted/processed data based on your output schema
  • Message History: Complete conversation between AI and your desktop
3

Generate and approve workflow trajectories

From the run details panel:
  • Click Generate Trajectory (when available) to promote that run’s captured path into your workflow trajectory library
Then navigate to your workflow’s Trajectories tab to:
  • Review step-by-step actions with screenshots
  • Approve trajectories to enable fast cached execution on future runs
Trajectories are Cyberdesk’s intelligent caching system. Capture happens in the background during runs, generation makes a trajectory visible/reviewable, and approval enables replay. Learn more in Trajectories 101.

What’s next?

SDK Guides

Deep dive into SDK features and advanced usage patterns

Workflow Prompting

Master workflow prompting with specialized tools and best practices

Trajectories 101

Learn how trajectories speed up workflows by caching successful executions

API Reference

Explore all available API endpoints

Learn More

Extract Prompt

Vision-based extraction with async processing modes

Focused Action

Dynamic observations and decisions in workflows

Looping Tools

Repeat workflow steps over arrays or counts efficiently

Generating Output Data

How observations transform into structured output

Async Extraction Patterns

Optimize workflow performance with batch and run-scoped async