search() and upload() to cache Playwright scripts. On repeat tasks, the LLM receives the cached script as context and decides whether to reuse it, modify it, or generate a new one.
Cached scripts are always reviewed by the LLM before execution — never run directly.
How It Works
Setup
Quick Example
What Gets Cached
The cached artifact is a complete, runnable Playwright Python script:Handling Optional Elements
Real pages have cookie banners, login modals, age gates, and other elements that may or may not appear. Cached scripts should check for these before interacting:
These guards get cached alongside the scraping logic, so subsequent runs of the same task handle the same popups automatically.
