Sentry's engineering team replaced ASCII DOM snapshots with a structured semantic context system for their Seer Agent. The old approach scraped DOM elements into character-by-character ASCII grids, consuming up to 50k tokens per page and leaving little room for conversation history. The new system uses a React context provider with a flat node registry where each UI component opts in to describe itself — contributing titles, modes, filters, and key values in a composable, bottom-up fashion. Results across 14,000+ runs show token usage for page context dropped dramatically (e.g., issue detail pages went from ~2,100 to ~300 tokens) while satisfaction rates remained unchanged. The architecture also enables agentic actions: Seer can now create and update dashboards on the user's behalf, with more UI interactions planned.

7m read timeFrom blog.sentry.io
Post cover image
Table of contents
The straightforward approach: ASCII snapshotsThe new approach: pages that describe themselvesWhat this looks like in practiceWhere we are and what’s coming
5.1K Impressions