{"id":50294720,"url":"https://github.com/chrisrobison/agentview","last_synced_at":"2026-05-28T08:03:59.416Z","repository":{"id":339367938,"uuid":"1161569415","full_name":"chrisrobison/agentview","owner":"chrisrobison","description":"A text-grid web renderer for AI agents — see the web without screenshots","archived":false,"fork":false,"pushed_at":"2026-02-19T11:01:18.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-19T15:17:32.578Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrisrobison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-19T09:06:22.000Z","updated_at":"2026-02-19T11:01:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chrisrobison/agentview","commit_stats":null,"previous_names":["chrisrobison/agentview"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/chrisrobison/agentview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fagentview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fagentview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fagentview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fagentview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisrobison","download_url":"https://codeload.github.com/chrisrobison/agentview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisrobison%2Fagentview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33599494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-28T08:03:58.236Z","updated_at":"2026-05-28T08:03:59.409Z","avatar_url":"https://github.com/chrisrobison.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AgentView\n\n**A text-grid web renderer for AI agents — see the web without screenshots.**\n\nInstead of taking expensive screenshots and piping them through vision models, AgentView renders web pages as structured text grids that LLMs can reason about natively. Full JavaScript execution, spatial layout preserved, interactive elements annotated.\n\n## Why?\n\n| Approach | Size | Requires | Speed | Spatial Layout |\n|----------|------|----------|-------|----------------|\n| Screenshot + Vision | ~1MB | Vision model ($$$) | Slow | Pixel-level |\n| Accessibility Tree | ~5KB | Nothing | Fast | ❌ Lost |\n| Raw HTML | ~100KB+ | Nothing | Fast | ❌ Lost |\n| **AgentView** | **~2-5KB** | **Nothing** | **Fast** | **✅ Preserved** |\n\n## How It Works\n\n```\n┌─────────────────────────────────────────────┐\n│  Agent API                                   │\n│  navigate(url) → text grid + element map     │\n│  click(ref) / type(ref, text) / scroll()     │\n├─────────────────────────────────────────────┤\n│  Text Grid Renderer                          │\n│  Pixel positions → character grid            │\n│  Interactive elements get [ref] annotations  │\n├─────────────────────────────────────────────┤\n│  Headless Chromium (via Playwright)          │\n│  Full JS/CSS execution                       │\n│  getBoundingClientRect() for all elements    │\n└─────────────────────────────────────────────┘\n```\n\nThe browser renders the page normally. AgentView extracts every visible element's position, size, text, and interactivity — then maps it all onto a character grid. Interactive elements get reference numbers like `[0]`, `[1]` that agents can use to click, type, or select.\n\n## Example Output\n\n```\n═══ HACKER NEWS ══════════════════════════════════════\n[0]Hacker News  [1]new  [2]past  [3]comments  [4]ask  [5]show  [6]jobs  [7]submit\n\n 1. [8]Show HN: AgentView - text-grid browser for AI agents (github.com)\n    142 points by chrisrobison 3 hours ago | [9]89 comments\n 2. [10]Why LLMs don't need screenshots to browse the web\n    87 points by somebody 5 hours ago | [11]34 comments\n 3. [12]The future of agent-computer interfaces\n    56 points by researcher 8 hours ago | [13]12 comments\n\n[14:______________________] [15 Search]\n```\n\n~500 bytes. An LLM can read this, understand the layout, and say \"click ref 8\" to open the first link. No vision model needed.\n\n## Install\n\n```bash\nnpm install -g agentview\nnpx playwright install chromium\n```\n\n## CLI Usage\n\n```bash\n# Render a page\nagentview https://news.ycombinator.com\n\n# Interactive mode\nagentview -i https://github.com\nagentview\u003e click 3\nagentview\u003e type 7 search query\nagentview\u003e scroll down\nagentview\u003e refs\nagentview\u003e quit\n\n# JSON output (for piping to agents)\nagentview -j https://example.com\n\n# Custom grid size\nagentview --cols 80 --rows 24 https://example.com\n```\n\n## HTTP API\n\n```bash\n# Start the server\nagentview --serve 3000\n\n# Navigate\ncurl -X POST http://localhost:3000/navigate \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"url\": \"https://example.com\"}'\n\n# Click an element\ncurl -X POST http://localhost:3000/click \\\n  -d '{\"ref\": 3}'\n\n# Type into an input\ncurl -X POST http://localhost:3000/type \\\n  -d '{\"ref\": 7, \"text\": \"search query\"}'\n\n# Scroll\ncurl -X POST http://localhost:3000/scroll \\\n  -d '{\"direction\": \"down\"}'\n\n# Get current state\ncurl http://localhost:3000/snapshot\n```\n\n## Programmatic Usage\n\n```javascript\nconst { AgentBrowser } = require('agentview');\n\nconst browser = new AgentBrowser({ cols: 120, rows: 40 });\n\n// Navigate and get the text grid\nconst { view, elements, meta } = await browser.navigate('https://example.com');\n\nconsole.log(view);        // The text grid\nconsole.log(elements);    // { 0: { selector, tag, text, href }, ... }\nconsole.log(meta);        // { url, title, cols, rows, totalRefs }\n\n// Interact\nawait browser.click(3);              // Click element [3]\nawait browser.type(7, 'hello');      // Type into element [7]\nawait browser.scroll('down');        // Scroll down\nconst snap = await browser.snapshot(); // Re-render\n\nawait browser.close();\n```\n\n## Grid Conventions\n\n| Element | Rendering |\n|---------|-----------|\n| Headings | `═══ HEADING TEXT ═══════` |\n| Links | `[ref]link text` |\n| Buttons | `[ref button text]` |\n| Text inputs | `[ref:placeholder____]` |\n| Checkboxes | `[ref:X] Label` or `[ref: ] Label` |\n| Radio buttons | `[ref:●] Label` or `[ref:○] Label` |\n| Dropdowns | `[ref:▼ Selected]` |\n| Separators | `────────────────` |\n| List items | `• Item text` |\n\n## Design Principles\n\n1. **Text is native to LLMs** — no vision model middleman\n2. **Spatial layout matters** — a flat list of elements loses the \"where\" that helps agents understand pages\n3. **Cheap and fast** — 2-5KB per render vs 1MB+ screenshots\n4. **Full web support** — real Chromium runs the JS, we just change how the output is represented\n5. **Interactive** — reference numbers map to real DOM elements for clicking, typing, etc.\n\n## License\n\nMIT © Christopher Robison\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisrobison%2Fagentview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisrobison%2Fagentview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisrobison%2Fagentview/lists"}