Playwright to AI Agent Migration (Part 1): The Assessment Matrix
Not every module is worth migrating to AI. Three evaluation dimensions: operation stability, structural change frequency, exception handling cost. Data-driven decisions, not intuition.
Why You Need an Assessment Matrix
When people hear "AI browser agents," the first impulse is "replace all Playwright scripts with AI." Understandable but wrong.
In our experience, full replacement leads to two outcomes:
- Both systems running — AI version built, scripts kept "just in case," double maintenance
- AI version abandoned — simple operations became unreliable with AI, switched back, migration effort wasted
A better approach is progressive migration. First step: which modules should move first, which shouldn't move at all.
Three-Dimension Assessment Matrix
Dimension 1: Operation Stability (1-5)
| Score | Meaning | Example |
|---|---|---|
| 5 | 100% reliable | Fixed URL, stable selector |
| 4 | <5% failure | Login with occasional CAPTCHA |
| 3 | 5-20% failure | Search results sort order varies |
| 2 | 20-50% failure | Form fields vary by user type |
| 1 | Very unreliable | Weekly page redesign |
Dimension 2: Change Frequency (1-5)
| Score | Meaning | Example |
|---|---|---|
| 5 | Years | Internal system standard form |
| 4 | Occasionally | Standard SaaS page |
| 3 | Months | E-commerce redesign |
| 2 | Monthly | A/B test heavy pages |
| 1 | Constantly | Dynamic content pages |
Dimension 3: Exception Cost (1-5)
| Score | Meaning | Example |
|---|---|---|
| 5 | Zero, auto retry | Read page title |
| 4 | Low, retry a few | Timeout retry |
| 3 | Medium, manual check | Data inconsistency |
| 2 | High, human needed | Form submission failure |
| 1 | Critical, business impact | Payment error, data loss |
Example Assessments
Task A: Login to internal system
Stability: 5 | Change: 5 | Exception: 4
Score: (5-5)+(5-5)+4 = 4 → "keep_script"
Task B: Extract price from e-commerce
Stability: 3 | Change: 3 | Exception: 3
Score: (5-3)+(5-3)+3 = 7 → "hybrid"
Task C: Process various supplier order formats
Stability: 2 | Change: 1 | Exception: 2
Score: (5-2)+(5-1)+2 = 9 → "prefer_ai"
Task D: Scrape government announcements
Stability: 1 | Change: 1 | Exception: 2
Score: (5-1)+(5-1)+2 = 10 → "strong_ai"Three Migration Strategies
keep_script → No migration. Scripts work fine.
hybrid → Scripts primary, AI for exceptions. Bridge layer auto-switches.
prefer_ai / strong_ai → AI primary, scripts for optimization.Summary
The assessment matrix core idea: not every scenario needs AI agents. Each scenario has its appropriate automation degree.
High stability, low change, low exception cost? Keep scripts. Low stability, high change, high exception cost? Migrate to AI first. Middle ground? Hybrid — scripts and AI collaborate in the same task flow.
Need an enterprise proxy plan?
We can tailor architecture to your target domains, concurrency, and reliability goals.