Overview
Skyvern provides a unified interface that combines traditional Playwright browser automation with AI-powered task execution. You can seamlessly mix traditional CSS selector-based interactions with natural language AI commands in the same session.The Hybrid Approach
Skyvern pages extend standard Playwright pages with additional AI capabilities. You get:- Traditional Playwright methods - All standard Playwright page methods (click, fill, goto, etc.)
- AI-augmented methods - Traditional methods enhanced with optional AI-powered element location
- Pure AI methods - New AI-powered commands for complex tasks
AI-Augmented Playwright Actions
All standard Playwright actions support an optionalprompt parameter for AI-powered element location.
Click
Three interaction modes:Fill
Fill input fields using selectors or natural language:Select Option
Select dropdown options using selectors or natural language:When to Use Each Approach
Use Traditional Selectors When:
- You know the exact CSS selector or XPath
- The page structure is stable and well-documented
- Performance is critical (selectors are faster)
- You’re automating your own website
Use AI-Powered Element Location When:
- Selectors are fragile or frequently change
- You need to work across multiple websites with different structures
- Element location is ambiguous (e.g., “the second blue button”)
- You’re automating third-party websites
Use Fallback Mode When:
- You have a selector but want a safety net
- You’re migrating from traditional automation to AI
- You want optimal performance with AI resilience
Complete Example: Mixing Traditional and AI
Best Practices
1. Start with Traditional Selectors
Use traditional selectors for critical paths where you know the structure:2. Add AI Fallbacks for Resilience
Add prompt fallbacks for elements that might change:3. Use AI for Complex Element Location
Let AI handle ambiguous or complex element selection:4. Combine Traditional and AI Strategically
5. Use AI for Multi-Step Workflows
For complex multi-step tasks, usepage.agent.run_task():
Performance Considerations
| Method | Speed | Resilience | Best For |
|---|---|---|---|
| Traditional selectors | Fastest | Low (breaks on changes) | Stable, known structures |
| AI-augmented (fallback) | Fast with safety net | High | Production automation |
| Pure AI | Slower | Highest | Dynamic content, third-party sites |
| AI tasks | Variable | Highest | Complex multi-step workflows |
See Also
- AI Commands - Full reference for AI-powered page methods
- Python SDK - Python SDK reference
- TypeScript SDK - TypeScript SDK reference