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
How It Works
- When the agent reaches a specified point in the workflow
- It calls
save_screenshot_as_run_attachment
with a descriptive filename - The current screen is captured and saved
- The screenshot is attached to the Run record
- 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
- Descriptive Filenames: Use clear, contextual names for easy identification
- Include Context: Specify when and what to capture
- Use Variables: Incorporate input variables for dynamic naming
- 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:
- Ensure the relevant content is fully visible (not cut off)
- Wait for all elements to load before capturing
- Maximize windows when capturing detailed information
- Consider zoom levels for readability
- 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
- Always specify clear, descriptive filenames
- Ensure content is fully loaded before capturing
- Use input variables for dynamic naming
- Capture at moments that provide maximum value
- Consider the screenshot’s purpose when framing the capture
- Document both success and failure states when relevant