Lower token payload
Typical output is around 2-5KB instead of ~1MB screenshots, reducing model overhead and latency.
Text-grid browser for AI agents
TextWeb executes full JavaScript in Chromium, then converts pages into compact, spatially meaningful text grids your LLM can reason about directly.
npm install -g textweb
Typical output is around 2-5KB instead of ~1MB screenshots, reducing model overhead and latency.
Element positions and visual structure are retained in a deterministic text grid, unlike raw HTML or accessibility trees.
Interactive elements are annotated with refs like [9], so agents can reliably click, type, and scroll.
Screenshot + vision model
~1 MB
Large binary payload, expensive vision inference, harder deterministic interaction mapping.
TextWeb output
~2-5 KB
[0] Hacker News [1] new | [2] past
1. [9] Show HN: TextWeb
142 points | [10] comments
[13:______________] [14 Search]
textweb https://news.ycombinator.com
textweb --interactive https://github.com
textweb --json https://example.com
Use textweb-mcp with Claude Desktop, Cursor, Windsurf, Cline, and other MCP-compatible clients.
Drop in tools/tool_definitions.json with OpenAI or Anthropic tool-calling workflows.
Use included adapters in tools/langchain.py and tools/crewai.py.
Run textweb --serve 3000 for REST endpoints or import AgentBrowser directly in Node.