Learn how to use visual failure artifacts to debug your AI agents when traces alone aren't enough.
Overview
Failure artifacts provide cinematic playback of exactly what went wrong when your AI agent encounters assertion failures. Unlike static screenshots, artifacts show the complete sequence of events leading to failure, making it easier to understand complex timing issues, visual bugs, and unexpected page behavior.
What Are Failure Artifacts?
Failure Artifacts are visual evidence automatically captured when your AI agent encounters assertion failures. They provide cinematic playback of exactly what went wrong, helping you debug complex issues that static screenshots can't capture.
Available Artifacts
Video Clips (MP4) - Smooth playback of the failure sequence (when ffmpeg is available)
Frame Gallery (JPEG/PNG) - Individual screenshots from the failure buffer
Metadata Files - JSON files with step details, timestamps, and failure context
When Artifacts Are Created
Only on assertion failures (not every failed step)
Captures the 15 seconds leading up to the failure (configurable)
Automatically uploaded to cloud storage and linked to your trace
Accessing Artifacts
Finding Artifacts in Sentience Studio
On the Trace List Page
Failed trace runs show an artifact indicator when visual evidence is available:
Artifact Badge: 🎬 icon indicates artifacts are available
Once you open a failed trace, artifacts appear in multiple places:
Header Badge: Shows artifact count in the run header
Timeline Markers: Failed steps have camera icons
Detail Panel Tab: "ARTIFACTS" tab appears when available
Opening the Artifacts Panel
Method 1: From the Header
Look for the artifact badge in the run header
Click it to open the artifacts viewer
Method 2: From Failed Steps
On the timeline, find steps marked with red camera icons
Click the camera icon to jump to artifacts for that failure
Method 3: From Detail Panel
Open any failed step's detail panel
Click the "ARTIFACTS" tab
Understanding the Artifacts Interface
When you open artifacts, you'll see a two-panel layout designed for efficient debugging:
Left Panel: Visual Evidence
The main area shows your visual debugging tools:
Video Player (when available):
HTML5 video player with custom controls
Speed control (0.25x to 4x) for detailed analysis
Timeline scrubbing and frame-by-frame stepping
Download button for offline viewing
Frame Gallery (fallback or alternative view):
Thumbnail grid of all captured frames
Click any frame for full-screen viewing
Batch download option for all frames
Right Panel: Failure Context
The metadata panel provides essential context:
Failure Summary:
Why the failure occurred (assertion message)
When the failure happened (timestamp)
Technical details (buffer duration, frame count)
Step Timeline:
Chronological breakdown of actions before failure
Color-coded success/failure indicators
Links back to the main trace debugger
Step-by-Step Debugging with Artifacts
Step 1: Identify Failed Runs with Artifacts
Start by finding traces that have visual evidence available:
Look for the artifact badge (🎬) on failed trace cards
Filter by status to focus on failed runs
Check recent runs for the most relevant failures
Step 2: Quick Video Assessment
Get the big picture with cinematic playback:
Open the failed trace in the debugger
Click the artifact badge in the header
Play the video at normal speed (1x) first
Note the exact moment when things go wrong
Pro Tip: Use 0.5x speed for complex sequences where timing matters.
Step 3: Detailed Frame Analysis
Dive deep with pixel-perfect inspection:
Switch to frame gallery for precise analysis
Enable diff overlays to see what changed
Zoom in on error messages or unexpected elements
Compare multiple frames to understand the sequence
When to use frames over video:
Need pixel-perfect comparison
Large video files are slow to load
Want to focus on specific moments
Documentation or bug reporting
Step 4: Correlate with Trace Data
Connect visual evidence with agent behavior:
Use timeline synchronization to link video to trace steps
Check the LLM tab - what was the agent "thinking" at failure?
Review verification signals - which assertions failed?
Compare with action details - did execution match expectations?
Step 5: Identify Root Causes
Use the combined evidence to find the real issue:
Common Failure Patterns
Pattern 1: Wrong Element Selection
Video Evidence: Agent clicks a different button than expected
Trace Correlation: LLM chose element #42, but user wanted #38
Solution: Improve element descriptions or selectors
Pattern 2: Timing Issues
Video Evidence: Action fires before page finishes loading
Trace Correlation: Duration shows 50ms execution, but page needed 2s
Solution: Add proper wait conditions or delays
Pattern 3: Form Validation Problems
Video Evidence: User fills form, clicks submit, error appears
Trace Correlation: Verification expected success message
Solution: Update assertion logic for validation states
Pattern 4: Dynamic Content Changes
Video Evidence: Page layout shifts during interaction
Trace Correlation: Element becomes hidden after scroll
Solution: Use stable selectors or wait for stability
Advanced Artifact Analysis
Video Playback Techniques
Speed Control Strategies:
0.25x - 0.5x: For analyzing rapid sequences or animations
1x: Normal review of the failure flow
2x - 4x: Fast-forward through uneventful periods
Timeline Navigation:
Scrub through time: Drag the progress bar to jump to key moments
Frame stepping: Use arrow keys for precise frame-by-frame analysis
Loop playback: Enable loop for studying repetitive behaviors
Frame Gallery Workflows
Comparative Analysis:
Open two frames side-by-side in different browser tabs
Use diff mode to highlight pixel-level changes
Zoom to 200%+ for detailed element inspection
Pattern Recognition:
Scan through frames chronologically looking for anomalies
Note timestamps of important state changes
Create frame sequences for documentation
Metadata Correlation
Step Timeline Analysis:
Color coding: Green = success, Yellow = warning, Red = failure
Duration patterns: Identify slow or fast operations
URL transitions: Track navigation and page changes
Failure Context:
Assertion details: What exactly was expected vs. what happened