Writing Effective Prompts
When creating workflows, clarity and specificity are paramount. Your prompts should be:- Unambiguous: Leave no room for interpretation
- Specific: Include exact details like file paths, button names, or expected values
- Actionable: Use clear, directive language
Example of Good vs Poor Prompting
Understanding Variables
Cyberdesk supports three types of variables in your workflows:Input Variables: {variable}
- When defined: Before the workflow starts
- Purpose: Pass dynamic data like patient names, dates, or IDs
- Example:
{patient_name},{report_date}
Runtime Variables: {{variable}}
- When defined: During workflow execution (ONLY by focused actions)
- Purpose: Store values discovered during the workflow for later use
- Example:
{{extracted_invoice_id}},{{found_file_path}} - Important: Can only be set by
focused_action, but once set can be used anywhere
Key Difference: Input variables are replaced before the agent sees them, runtime variables are set during execution and used by subsequent steps, and sensitive variables are passed verbatim (as aliases) to tools but their plaintext values are never exposed to the agent; they are resolved only during actual computer actions.
Sensitive Variables: {$variable}
- When defined: At run creation (via
sensitive_input_values) - Purpose: Handle secrets like passwords, SSNs, tokens without exposing plaintext to the agent or logs
- Example:
{$password},{$ssn} - Behavior:
- Kept as
{$variable}in prompts and passed verbatim to tools - Stored securely in a third‑party vault (Basis Theory) only for the duration of the run
- Never logged, never shown on the dashboard, and never sent to LLMs
- Resolved to plaintext only at the last mile (e.g., when typing), then deleted from the vault after run completion
- Kept as
Utilizing Prompt Images
Images can anchor your instructions with visual context. Add screenshots alongside your text in the dashboard editor to help the agent recognize ambiguous icons, menu locations, or tricky UI flows (especially in legacy apps).- Place images near the paragraph they illustrate for best results
- Use images as guidance – the agent will still take fresh screenshots during execution
- Keep images focused on the relevant UI area; include multiple images if needed
Runtime access to prompt images is available via the
grab_reference_image tool by filename (tail only). After analyzing any reference or zoomed image, the agent should take a fresh full screenshot before issuing coordinate actions. When specifying zoom regions, consider leaving a small margin so labels/edges aren’t cropped.Understanding Trajectories and Cached Tools
Cyberdesk’s intelligent caching system uses trajectories to record successful workflow executions and replay them deterministically. When a workflow has an approved trajectory, it can complete in seconds instead of minutes. To maximize this feature while still doing dynamic actions, you must properly prompt the agent to use special dynamic tools.More on Trajectories:
Learn more in Trajectories 101.
Dynamic Tools in Cached Workflows
Even during cached trajectory replay, certain tools execute dynamically to capture fresh data:- focused_action: Focused computer use agent to complete an always dynamic part of the workflow
- Screenshot with extract_prompt: Extracts fresh data from current screen, and can set runtime values
- copy_to_clipboard: Captures current clipboard contents, setting a runtime value
The Essential Workflow Tools
1. Focused Action
Capture dynamic content or make context-aware decisions during cached runs.When to use
- Selecting different items from a list each run
- Extracting dynamic data that changes between runs
- Making decisions based on screen content
2. Mark File for Export
Export files from the remote machine after workflow completion.When to use
- Downloading generated reports
- Extracting processed files
- Saving workflow outputs
3. Save Screenshot as Run Attachment
Capture important moments as screenshots accessible after the run.When to use
- Documenting visual confirmation
- Capturing patient X-rays or medical images
- Recording transaction confirmations
4. Grab Reference Image
Retrieve a user-provided prompt image during execution by filename (tail only).When to use
- Provide visual context to disambiguate UI elements
- Help the agent recognize specific screens, dialogs, or popups
5. Copy to Clipboard
Execute Ctrl+C and automatically save clipboard contents as a runtime variable.When to use
- Extracting text from legacy systems
- Capturing non-selectable UI elements
- Getting data from read-only fields
- Quick text extraction with manual selection
6. Screenshot with Extract Prompt
Vision-based data extraction with flexible async processing modes (synchronous, batch-scoped, or run-scoped) and ability to set a runtime valueWhen to use
- Non-copyable content (images, PDFs, charts, tables)
- Parallel extraction across multiple views
- When navigation doesn’t depend on extraction results
- Quickly setting one off runtime values
Quick Start: Simple Extraction
Parallel Extraction Across Multiple Screens
Make extraction 3-5x faster by usingprocess_async="batch" when scrolling or navigating:
Run-Scoped Extraction (Fully Non-Blocking)
For large extractions that don’t affect navigation, useprocess_async="run":
Learn More: See the Extract Prompt page for detailed documentation on async modes, runtime variable integration, and advanced patterns.
7. Execute Terminal Command
Run PowerShell commands on the Windows machine.When to use
- System administration tasks
- File operations
- API calls or data processing
8. Declare Task Failed
Terminate workflow execution when failure conditions are met.When to use
- Error handling
- Validation failures
- Preventing unnecessary continuation
Quick Examples
Using Focused Action
Exporting Files
Capturing Screenshots
Copying to Clipboard
Running Terminal Commands
Handling Failures
Next Steps
For detailed information about each tool, including advanced usage patterns and real-world examples, explore the individual tool documentation pages:Focused Action
Dynamic observations and decisions
Mark File for Export
File extraction from workflows
Save Screenshot
Visual documentation
Extract Prompt
Vision-based extraction with optional async extraction
Copy to Clipboard
Copy text and save as runtime variable
Grab Reference Image
Use prompt images at runtime
Execute Terminal
PowerShell automation
Declare Task Failed
Error handling