Workflows (Beta)
Beta Feature: Workflows are currently in beta. API endpoints and features may change.
Workflows are reusable automation sequences that can be generated once and executed multiple times with different inputs. Unlike tasks that require AI processing for every execution, workflows are deterministic YAML-based scripts that provide faster, more cost-effective automation.
When to Use Workflows
Use Workflows for:
- ✅ Repetitive tasks with similar structure
- ✅ Form submissions with variable data
- ✅ Data extraction from consistent page layouts
- ✅ Multi-user operations (same flow, different credentials)
- ✅ Scheduled automations
Use Tasks for:
- ❌ One-time or exploratory automation
- ❌ Dynamic, unpredictable scenarios
- ❌ Complex decision-making requirements
Quick Start
1. Create & Generate Workflow
Create a workflow and generate it from a task description in one flow:
Generation Cost: $0.01 per step
2. Execute with Inputs
Once generated, execute the workflow with different inputs:
Execution Cost: LLM tokens + $0.001 initialization
Generation Options
Variable Extraction
The system automatically detects input variables from your task prompt:
Variable Detection Methods:
YAML Cleanup
Optimize generated workflows for readability:
Execution Management
Check Execution Status
Response:
Cancel Execution
Get Execution Logs
Returns a presigned URL to download detailed execution logs.
Workflow States
Generation Status
pending- Created, generation not startedgenerating- Recording browser interactionscompleted- Ready to executefailed- Generation error occurred
Execution Status
pending- Queued for executionrunning- Currently executingcompleted- Finished successfullyfailed- Error during executioncancelled- Manually stopped
Best Practices
Task Prompts:
- ✓ Be specific: “Fill form at example.com/contact with name, email”
- ✓ Include example values: “name: John Doe, email: john@example.com”
- ✗ Avoid vague: “Submit the form”
Cost Optimization:
- Generate once, execute many times
- Use pattern-based variable detection (free)
- Enable AI validation only for complex scenarios
- Minimize
extract_page_contentsteps in workflows
Monitoring:
- Use webhooks for production systems (see Webhooks)
- Implement exponential backoff for polling
- Download logs for failed executions
Input Validation:
- Check workflow’s
input_schemabefore executing - Use the
input_templateas a starting point - Validate required parameters
Webhooks
Receive real-time notifications for workflow execution status changes:
See Webhooks documentation for setup and signature verification.
Limitations (Beta)
- Sync execution mode not yet implemented (only async available)
- Generated workflows work best with consistent page structures
- Complex dynamic scenarios may require traditional tasks
- File uploads in workflows have limited support
API Reference
For complete API documentation including all parameters, response formats, and error codes, see: