95%+ Token Reduction

Stop burning millions of tokens on DOM dumps and A11y trees.

The Predicate Snapshot Engine uses ML to rank web elements by actionability. Cut observation tokens by 95%+, reduce latency, and eliminate hallucinations caused by HTML noise. Built natively as an OpenClaw Skill to replace default A11y trees.

$npx clawdhub install predicate-snapshot

Token Savings: Real Sites

slickdeals.net99.8% savings
Default A11y Tree
598,301
tokens (24k elements)
Predicate Snapshot
1,283
tokens (50 elements)
news.ycombinator.com96% savings
16,484587 tokens
ML-Ranked Actionability

Filters out ad iframes, tracking pixels, and decorative garbage. Returns only the 50 most relevant elements.

The Problem: A11y Trees on Real Sites

Ad-heavy sites dump 500k+ tokens into your context window. Most are tracking pixels, hidden modals, and decorative garbage.

SiteDefault A11y Tree / DOMPredicate SnapshotSavings
slickdeals.net598,301(24k elements)1,283(50 elements)99.8%
news.ycombinator.com16,484(681 elements)587(50 elements)96.0%
httpbin.org/html1,590(34 elements)164(4 elements)90.0%

Why 50 Elements Is Enough

Filter the Noise

Ad iframes, tracking pixels, and hidden overlays are stripped out. Only actionable elements remain.

ML-Ranked Actionability

We extract only what the LLM needs to click, fill, or read. The ML model identifies the most relevant elements.

Compact Output

Pipe-delimited strings optimize context windows and prevent overflow. LLM-friendly format.

For Individual Developers / OpenClaw Users

Stop paying for ad-heavy DOM noise.

You're running OpenClaw agents on real-world sites. Standard accessibility trees dump 500k+ tokens of tracking pixels, hidden modals, and decorative divs into your context window. You're burning API credits on garbage.

  • 95%+ token reduction
  • Faster inference and lower latency
  • Compact pipe-delimited output
snapshot_output.txt
# 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
quick_start.sh
# 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)
For Tech Leads & Platform Teams

Better accuracy. Fewer hallucinations.

Feeding massive OpenClaw A11y trees to an LLM doesn't just cost money—it destroys accuracy. The larger the context window, the more the agent hallucinates interactions with invisible or irrelevant elements.

  • ML-ranked element filtering
  • Context headroom for multi-step reasoning
  • Works autonomously via system prompts
For Local AI Enthusiasts

Make local 3B models viable for the web.

You want to run autonomous browser agents locally, but Llama and Qwen choke on massive HTML dumps. By compressing the actionable DOM into a few hundred tokens, Predicate makes complex web automation possible on small, local models.

  • Proved on 3B local models
  • No API keys required for heuristic mode
  • 100% private execution

ML Cloud Mode

95-99% reduction

ML-powered ranking for maximum token savings. Best accuracy.

PREDICATE_API_KEY=sk-...

Local Heuristic Mode

FREE

Rule-based pruning. No API key needed. ~80% token reduction.

/predicate-snapshot-local

Stop burning 500k tokens on DOM noise. Start with 50.

95%+ token reduction. ML-ranked actionability. Drop-in replacement for OpenClaw's default observation tools.

$npx clawdhub install predicate-snapshot