# ITB: The Interactive Text Browser ## Understanding the Challenge Modern websites are designed for human interaction. They rely on visual cues, spatial relationships, and complex interactions through mouse and keyboard. A human can instantly understand that a blue underlined piece of text is clickable, that a grid of product cards represents a catalog, or that a hamburger icon will reveal a navigation menu. AI agents, however, process information differently. They need structured data that explicitly describes both content and interaction possibilities. Traditional web scraping tools can extract content but struggle with interaction. Screen readers come closer but are optimized for linear reading rather than complex interaction patterns. ITB (Interactive Text Browser) bridges this gap. It transforms web pages into a format that AI agents can process effectively while preserving all the interaction capabilities a human would have. This transformation focuses on what matters for interaction - the content that's visible and the ways it can be manipulated - while removing technical complexity that only exists to support visual presentation. ## How ITB Works ITB operates as a bridge between an AI agent and a web browser. When you start ITB, it launches a browser process that runs independently, just like when you open a browser yourself. This browser loads and renders web pages normally, but instead of displaying them on screen, it communicates their content and state to the AI agent through a simplified XML format. Most of ITB's work happens through JavaScript that runs directly in the browser. Rather than making many small requests back and forth between Python and the browser, ITB bundles operations together into efficient JavaScript operations. This approach significantly improves performance while making the system more reliable. Consider a typical login form interaction. Instead of separate commands to find fields, click them, and type text, ITB might execute a single JavaScript operation that handles the entire interaction: ```javascript // Single efficient operation instead of multiple commands function fillLoginForm(username, password) { const usernameField = document.getElementById('username'); const passwordField = document.getElementById('password'); // Perform all operations in one go usernameField.focus(); usernameField.value = username; passwordField.focus(); passwordField.value = password; return { username_entered: true, password_entered: true, submit_button_enabled: document.querySelector('button[type="submit"]').disabled === false }; } ``` ## Page Representation ITB transforms complex HTML structures into a simplified XML format that represents what's actually visible and interactive on the page. Let's look at several examples to understand this transformation. ### Text Content When a human reads a webpage, they naturally process related content together regardless of how it's structured in HTML: ```html
Scientists announce breakthrough...