
What happened
A new open-source Python package called Shadow Web compresses HTML pages before sending them to AI agents, reducing token costs by 64–97% on real websites. A Wikipedia page drops from 99,343 tokens to 16,462 tokens (−83%), and GitHub Trending falls from 167,875 to 37,833 tokens (−77%).
Why it matters
AI agents often waste tokens on unused scripts, styles, and hidden DOM elements. Shadow Web keeps only interactive elements, semantic labels, and clean data structures—letting AI developers lower API costs and improve agent reliability without cloud infrastructure.
What to watch
The tool is available now as a pip-installable package (shadow-web) and includes built-in support for Cursor and Claude via a 22-tool MCP server; it also parses tables, forms, and lists into JSON or CSV, and works offline.
Summaries like this, in your inbox every morning.
Web pages contain far more HTML than AI agents need to see: inline stylesheets, JavaScript bundles, tracking pixels, and dynamically-rendered shadow DOM elements buried in Web Components. Most of this noise becomes tokens sent to an LLM, inflating API bills without adding semantic value. Shadow Web sits between the browser and the LLM, reading the live DOM (including shadow trees), stripping decorative markup, and organizing what remains into a sparse Action Map—a list of clickable elements with labels and semantic groups (like "Login", "Cart", "Navigation"). This cuts raw token load by 64–97% depending on the page.
The tool also solves a secondary pain point: Playwright and other browser automation libraries struggle to reach elements inside shadow DOM or closed Web Components, and selectors break when the DOM changes. Shadow Web provides self-healing selectors that first try fuzzy local recovery, then fall back to LLM verification if needed—no cloud roundtrip required for most failures. For teams building AI agents that navigate the web, this combination of compression, structural parsing (SchemaSnap), and local selector repair reduces both API costs and error rates.
The package is pip-installable and includes turnkey integrations for Cursor and Claude via an MCP (Model Context Protocol) server. It works offline and produces no side effects on the original page, making it safe to use with any framework (React, Vue, Svelte, etc.). Benchmarks on real sites show token reductions of 6× on Wikipedia and 4.4× on GitHub Trending.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
Circlia started a proof-of-concept for TASTE SIGNAL: visitors to Holland Village Cafe FUKUOKA taste cookies an…

In a webinar hosted by French Mathematical Society president Isabelle Gallagher, Fields Medal winner Hugo Dumi…

NVIDIA released Nemotron 3.5 Super VL, an open-weight model with 120 billion parameters that handles text, ima…

NVIDIA released Nemotron 3.5 Bolt 74B-A9B 24GB, an AI model for local agents that hits over 80 tokens per seco…

NVIDIA published a blog post titled "AI Security Is an Engineering Problem - How to Solve It at Every Layer of…

In the test, Haiku 5.5 on medium setting averaged scores close to Sonnet 5.5 on routine documents at about 1/1…
