Quick start
Use{{double brackets}} around values that can change between runs. The first call runs the full agent. Every subsequent call with the same template uses the cached script.
How it works
You send a task with {{brackets}}
The brackets mark which parts are parameters:
{{example.com}}→ parameter 1{{electronics}}→ parameter 2
"Get prices from {{}} for {{}}".System hashes the template
Template
"Get prices from {{}} for {{}}" is hashed to a unique ID like a7f3b2c1.
The system checks the workspace for scripts/a7f3b2c1.py.Cache miss → agent creates script
If no script exists, the full agent runs your task. After completing it, the agent saves a standalone Python script that reproduces the result deterministically — no AI needed.
Auto-detection
Caching activates automatically when both conditions are met:- The task contains
{{and}} - A
workspace_idis provided
cache_script:
| Value | Behavior |
|---|---|
None (default) | Auto-detect from {{brackets}} + workspace |
True | Force-enable, even without brackets |
False | Force-disable, even if brackets are present |
Examples
Parameterized scraping
Run once, then loop over different keywords at $0 LLM each:No parameters — cache the exact task
Append empty brackets{{}} to signal “cache this exact task”:
Multiple parameters
Force enable / disable
Inspecting cached scripts
You can download and inspect the scripts the agent created:Auto-healing
Cached scripts can break when a website changes its layout, adds new elements, or alters its structure. Auto-healing detects these failures and automatically regenerates the script.How it works
When a cached script runs, the system validates its output:- Fast checks (no LLM) — detects empty results, error fields in JSON, or exception keywords in output.
- LLM judge — if fast checks pass, a lightweight model validates whether the output looks correct for the original task.
- Heal — if validation fails, the full agent re-runs the task and saves an updated script.
Cost impact
| Scenario | LLM cost |
|---|---|
| Cached script succeeds | $0 |
| Cached script fails, auto-heals | ~$0.05–1.00 (one full agent run) |
| Healed script also fails | Same as above (returns best-effort output) |
Cost comparison
| LLM cost | Browser + proxy | Time | |
|---|---|---|---|
| First call (agent) | ~$0.05–1.00 | Yes | ~30–120s |
| Cached calls | $0 | Yes | ~3–10s |
The browser and proxy still run for cached calls (the script may need them), so there is a small infrastructure cost per execution. LLM cost drops to zero.