Generate synthetic web environments at scale by specifying websites as Finite State Machines with explicit state transitions, then programmatically executing GUI actions to collect verified interaction trajectories. Reduces trajectory cost from $0.15–$1.00 to $0.04 per sample while generating 11,000+ verified trajectories with deterministic, executable validation requiring no external judges.
Scanned 9/9/2026
Install to Claude Code
npx -y skills add ADu2021/skillXiv --skill autowebworld-synthetic-web-environments --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Autowebworld Synthetic Web Environments?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/adu2021-autowebworld-synthetic-web-environments)More formats (shields.io, HTML) on the badges page.
---
name: autowebworld-synthetic-web-environments
title: "AutoWebWorld: Synthesizing Infinite Verifiable Web Environments"
version: 0.0.2
engine: skillxiv-v0.0.2-claude-opus-4.6
license: MIT
url: "https://arxiv.org/abs/2602.14296"
keywords: [web automation, agent training, synthetic data generation, finite state machines, trajectory collection]
description: "Generate synthetic web environments at scale by specifying websites as Finite State Machines with explicit state transitions, then programmatically executing GUI actions to collect verified interaction trajectories. Reduces trajectory cost from $0.15–$1.00 to $0.04 per sample while generating 11,000+ verified trajectories with deterministic, executable validation requiring no external judges."
---
# AutoWebWorld: Deterministic State-Machine Web Environments for Agent Training
Training web automation agents requires diverse, labeled interaction trajectories, but collecting real-world web data is expensive (requiring human judges or reward models), slow (real websites have variable latency), and non-reproducible (website layouts change constantly). Existing synthetic approaches either produce toy websites or generate trajectories without programmatic verification, limiting scalability and trustworthiness.
The core insight is treating websites as Finite State Machines where all state transitions are explicit and deterministic, enabling programmatic trajectory verification without external judges. By making state transitions machine-readable, the system can enumerate valid action sequences through breadth-first search and validate them through execution.
## Core Concept
AutoWebWorld uses a four-stage pipeline grounded in FSM theory:
1. **FSM Specification**: Multi-agent framework generates a formal FSM for each website theme, defining pages, allowable states, deterministic preconditions, and state transition effects
2. **Code Generation**: Coding agents translate the FSM into executable Vue.js front-end code, iterating until the project builds successfully
3. **Trajectory Enumeration**: Breadth-first search explores the FSM graph to generate all valid action sequences, expanded into atomic GUI operations
4. **Execution & Filtering**: Execute trajectories on synthesized websites using Playwright, retaining only those where all steps succeed
The key advantage: unlike real websites with implicit state, AutoWebWorld defines states explicitly, enabling deterministic validation without human review or learned judges.
## Architecture Overview
- **FSM Graph**: Nodes represent website states (pages, form states); edges represent actions (clicks, form fills) with preconditions and effects
- **Web Generation Pipeline**: Convert FSM to Vue component hierarchy with routing, form handling, and state management
- **Action Executor**: Atomic operations for GUI interaction (locate element, click, enter text, submit form)
- **Trajectory Validator**: Execute full trajectories and mark as valid only if all steps complete without error
- **Cost Evaluator**: Track generation cost (LLM calls), execution cost (Playwright runtime), and cost per verified trajectory
## Implementation
Define an FSM specification as a structured schema, then generate websites programmatically:
```python
def create_fsm_spec(theme='shopping'):
"""
Define FSM specification for a website theme.
Returns dict with pages, initial state, and transitions.
"""
spec = {
'theme': theme,
'pages': [
{'id': 'home', 'elements': ['product_list', 'search_bar', 'cart_icon']},
{'id': 'product_detail', 'elements': ['product_image', 'add_to_cart_btn', 'back_btn']},
{'id': 'cart', 'elements': ['item_list', 'checkout_btn', 'continue_shopping_btn']}
],
'initial_state': 'home',
'transitions': [
{
'from': 'home',
'to': 'product_detail',
'action': 'click_product',
'precondition': 'product_exists',
'effects': ['set_selected_product']
},
{
'from': 'product_detail',
'to': 'cart',
'action': 'add_to_cart',
'precondition': 'product_selected',
'effects': ['update_cart_count']
}
]
}
return spec
```
Enumerate valid action sequences through FSM traversal:
```python
def enumerate_trajectories(fsm_spec, max_depth=5):
"""
BFS enumeration of all valid trajectories through FSM.
Returns list of (state_sequence, action_sequence) tuples.
"""
from collections import deque
initial = fsm_spec['initial_state']
queue = deque([(initial, [])])
trajectories = []
while queue:
state, actions = queue.popleft()
if len(actions) >= max_depth:
trajectories.append((state, actions))
continue
# Find all valid transitions from current state
for transition in fsm_spec['transitions']:
if transition['from'] == state:
next_state = transition['to']
next_action = transition['action']
queue.append((next_state, actions + [next_action]))
trajectories.append((next_state, actions + [next_action]))
return trajectories
```
Execute trajectories and validate success:
```python
async def validate_trajectory(trajectory, playwright_page):
"""
Execute action sequence on synthesized website using Playwright.
Returns True if all actions succeed; False if any step fails.
"""
state_sequence, action_sequence = trajectory
try:
for action in action_sequence:
# Locate element and execute action
element = await locate_element(action, playwright_page)
if element is None:
return False
if action.startswith('click'):
await element.click()
elif action.startswith('fill'):
await element.fill('test_input')
await playwright_page.wait_for_load_state('networkidle')
return True
except Exception as e:
return False
```
## Practical Guidance
| Parameter | Default | Guidance |
|---|---|---|
| Max FSM depth | 5 | Balance trajectory diversity (higher) with generation cost (lower) |
| Themes per batch | 3 | Generate home, shopping, form-filling; add more for diversity |
| Tests per trajectory | 1 | Run 1 execution per trajectory; retry failures with different seeds |
| Cost threshold | $0.10/traj | Monitor LLM + execution costs; regenerate if >$0.15 |
**When to use**: When training web automation agents where real-world trajectory costs are prohibitive or reproducibility is critical.
**When not to use**: For tasks requiring faithful real-world website behavior (responsive design, actual external APIs); synthetic FSM websites are deterministic and simplified.
**Common pitfalls**:
- FSM specifications too simple; enumerate valid transitions carefully to match realistic navigation
- Not handling timing correctly; add waits between actions for dynamic content loading
- Forgetting to validate trajectories; execute on actual synthesized website before accepting
## Reference
AutoWebWorld reduces trajectory cost to $0.04 per sample (vs. $0.15–$1.00 for human-validated data) while generating 11,000+ verified trajectories. The approach scales to diverse themes and enables reproducible agent training without external judges.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!