Text-grid browser for AI agents

See the web as text, not screenshots.

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

Why teams choose TextWeb

Lower token payload

Typical output is around 2-5KB instead of ~1MB screenshots, reducing model overhead and latency.

Preserved layout

Element positions and visual structure are retained in a deterministic text grid, unlike raw HTML or accessibility trees.

Actionable references

Interactive elements are annotated with refs like [9], so agents can reliably click, type, and scroll.

From screenshot blob to readable grid

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]
          

Quick start

textweb https://news.ycombinator.com
textweb --interactive https://github.com
textweb --json https://example.com

Integrations

MCP server

Use textweb-mcp with Claude Desktop, Cursor, Windsurf, Cline, and other MCP-compatible clients.

Function calling

Drop in tools/tool_definitions.json with OpenAI or Anthropic tool-calling workflows.

LangChain + CrewAI

Use included adapters in tools/langchain.py and tools/crewai.py.

HTTP + Node.js API

Run textweb --serve 3000 for REST endpoints or import AgentBrowser directly in Node.