Raw DOM dumps cause hallucinations. We give the LLM only the elements it needs to act—deterministic checks instead of expensive LLM judging.
The Predicate Snapshot Engine filters noise and ranks elements by actionability. Drop-in replacement for default A11y trees—fewer hallucinations, lower cost.
npx clawdhub install predicate-snapshotSame page. A fraction of the tokens. Lower cost, better accuracy.
Filters out ad iframes, tracking pixels, and decorative garbage. Returns the 50 most actionable elements—so you stop paying for noise.
Ad-heavy sites dump 500k+ tokens into your context window. Most are tracking pixels, hidden modals, and decorative garbage.
We give the LLM only the elements it needs to click, fill, or read. Same page—a fraction of the tokens.
| Site | Default A11y Tree / DOM | Predicate Snapshot | Savings |
|---|---|---|---|
slickdeals.net | 598,301(24k elements) | 1,283(50 elements) | 99.8% |
news.ycombinator.com | 16,484(681 elements) | 587(50 elements) | 96.0% |
httpbin.org/html | 1,590(34 elements) | 164(4 elements) | 90.0% |
Fifty ranked elements beat 24,000 raw nodes. Less noise, fewer hallucinations, lower cost.
Ad iframes, tracking pixels, and hidden overlays stripped out. Only actionable elements remain.
We surface only what the LLM needs to click, fill, or read. Most relevant elements first.
Pipe-delimited, context-friendly. Fits small context windows and avoids overflow.
OpenClaw on real sites means default A11y trees dump 500k+ tokens of tracking pixels, hidden modals, and decorative divs into your context. You're burning API credits on garbage. We cut that to a few hundred tokens—only what the agent needs to act.
# Pipe-delimited output format (LLM-friendly)
ID|role|text|imp|is_primary|docYq|ord|DG|href
42|button|Sign In|0.98|true|520|1|auth-form|
15|textbox|Username|0.95|true|480|1|auth-form|
23|textbox|Password|0.92|true|500|2|auth-form|
67|link|Forgot Password?|0.71|false|540|3|auth-form|/reset
89|button|Create Account|0.68|false|600|1|signup|
# 50 ranked elements vs 24,567 raw DOM nodes
# 1,283 tokens vs 598,301 tokens# 1. Install the skill via ClawHub
npx clawdhub@latest install predicate-snapshot
# 2. (Optional) Set API key for ML-powered ranking
export PREDICATE_API_KEY="sk-your-key-here"
# 3. Use in OpenClaw
/predicate-snapshot # Get top 50 ranked elements
/predicate-act click 42 # Click element by ID
/predicate-snapshot-local # Free local mode (no API)
# Without API key: ~80% token reduction (heuristic)
# With API key: ~95% token reduction (ML-ranked)Huge A11y trees don't just cost money—they hurt accuracy. The more noise in context, the more the agent hallucinates clicks on invisible or irrelevant elements. Smaller, ranked snapshots mean the LLM sees only what matters.
Llama and Qwen choke on massive HTML dumps. Compress the actionable DOM into a few hundred tokens and complex web automation runs on small, local models—no cloud API required for heuristic mode.
ML-powered ranking for maximum token savings. Best accuracy.
PREDICATE_API_KEY=sk-...Rule-based pruning. No API key needed. ~80% token reduction.
/predicate-snapshot-local