Skip to main content

What is Save Screenshot?

Save Screenshot as Run Attachment is a specialized tool that captures the current screen state and saves it as an attachment to your workflow run. Unlike regular screenshots used for navigation, these are specifically preserved as outputs that can be accessed after the workflow completes.
In your prompts, always refer to this tool as save_screenshot_as_run_attachment (lowercase, with underscores).

Why This Tool Exists

Visual documentation is crucial for many workflows:
  • Proof of Completion: Transaction confirmations, submission receipts
  • Medical Imaging: X-rays, scans, patient charts
  • Quality Assurance: Visual verification of results
  • Compliance: Audit trails and visual evidence
  • Data Capture: Charts, graphs, or visual data that’s hard to extract
This tool ensures important visual moments are captured even during cached runs, providing consistent documentation across all executions.

How It Works

  1. When the agent reaches a specified point in the workflow
  2. It calls save_screenshot_as_run_attachment with a descriptive filename
  3. The current screen is captured and saved
  4. The screenshot is attached to the Run record
  5. The attachment ID is added to the Run’s output_attachment_ids array
Screenshots are captured at full screen resolution and saved in PNG format for maximum quality and compatibility.
You can optionally pass a zoom_bounding_box parameter to capture a zoomed-in crop for analysis. Format: [x1, y1, x2, y2] in pixels relative to the full screenshot. After analyzing a zoomed image, always take a fresh full screenshot before generating coordinate actions.
zoom_bounding_box is clamped to the screenshot bounds if values go out of range, and coordinates are always interpreted in the full-screenshot pixel space (not the zoomed image). Consider including a small padding margin in your bbox to avoid cropping labels/edges.

When to Use Screenshot Attachments

1. Confirmation Screens

2. Medical Images

3. Dashboard Captures

4. Error Documentation

How to Prompt for Screenshots

Best Practices

  1. Descriptive Filenames: Use clear, contextual names for easy identification
  2. Include Context: Specify when and what to capture
  3. Use Variables: Incorporate input variables for dynamic naming
  4. Be Specific: Clearly indicate the exact moment to capture

Prompt Template

Zoomed Captures

Real-World Examples

Healthcare: Patient Documentation

E-commerce: Order Processing

Finance: Transaction Records

Insurance: Claim Evidence

Naming Strategies

Dynamic Naming with Variables

Using Runtime Variables in Names

Sensitive Variables

If your prompt includes {$variable}, the value is handled securely and never logged or shown. Avoid including secrets in screenshot filenames or on-screen content. The agent will not repeat secrets in observations, but screenshots may still capture whatever is visible on screen; prefer verification that doesn’t display the secret.

Sequential Captures

Timestamped Names

Common Patterns

Wait Before Capture

Conditional Screenshots

Multiple Page Documentation

Quality Considerations

Tips for high-quality screenshots:
  1. Ensure the relevant content is fully visible (not cut off)
  2. Wait for all elements to load before capturing
  3. Maximize windows when capturing detailed information
  4. Consider zoom levels for readability
  5. For small UI elements, consider zoom_bounding_box to improve clarity

Ensuring Content Visibility

Handling Pop-ups and Overlays

Integration with Other Tools

With Focused Action

With File Export

Documentation Workflow

Advanced Usage

Creating Visual Logs

Comparison Documentation

Error State Collection

Best Practices Summary

  1. Always specify clear, descriptive filenames
  2. Ensure content is fully loaded before capturing
  3. Use input variables for dynamic naming
  4. Capture at moments that provide maximum value
  5. Consider the screenshot’s purpose when framing the capture
  6. Document both success and failure states when relevant