diff --git a/tools/itb/README.md b/tools/itb/README.md index a399c60..1a0db75 100644 --- a/tools/itb/README.md +++ b/tools/itb/README.md @@ -12,30 +12,6 @@ ITB (Interactive Text Browser) bridges this gap. It transforms web pages into a 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. @@ -57,7 +33,7 @@ When a human reads a webpage, they naturally process related content together re - Breaking News - 2024-12-20 - By John Smith - Scientists announce breakthrough... + Breaking News - 2024-12-20 - By John Smith - Scientists announce breakthrough... ``` @@ -79,11 +55,11 @@ ITB describes elements by their interaction capabilities rather than their HTML - Username: - - Password: - - Login + Username: + + Password: + + Login ``` @@ -94,7 +70,7 @@ Media elements like images, videos, and audio are represented simply with their ```html
- System architecture diagram + System architecture diagram
@@ -120,7 +96,7 @@ Modern web pages often embed content from other sources using iframes. While hum - Welcome Back + Welcome Back