Back to Articles
Mar 13, 20262 days ago

Don't Miss This If You Use OpenClaw! One Sentence Lets Your Agent Learn to Control the Browser, Saving 13x the Tokens.

S
sitin@sitinme

AI Summary

This article tackles a common and costly frustration for users of the AI agent OpenClaw: its default method of browser control. Instead of using structured data, OpenClaw typically relies on taking screenshots and analyzing them with vision models, a process that burns through tokens with each imprecise interaction. The piece introduces a powerful solution, PinchTab, a lightweight tool that allows your agent to understand and manipulate web pages through text instead of images, promising dramatic token savings. The guide walks you through a seamless integration process, demonstrating how to install PinchTab directly from your OpenClaw dialog and transform it into a reusable skill. You'll see practical examples of the efficiency gains, from opening pages and clicking elements to extracting clean project information from sites like GitHub, all for a fraction of the usual token cost. The article also hints at advanced capabilities like running multiple browser instances in parallel for managing separate social media accounts. Ultimately, this is a practical upgrade for any OpenClaw user looking to optimize their workflow and budget. By following the clear, step-by-step instructions, you can equip your agent with a more precise and economical way to navigate the web. For the full tutorial, including key commands and important security notes, read the complete article.

OpenClaw 什么都好,但有一个地方挺让人头疼——浏览器控制。

你让 Agent 帮你去网页上操作点东西,它默认走截图路线:截一张图,花 10000 个 token 分析,加入位置不精准,来回几次,token 烧得比写代码还贵。

最近在推特上看到一个思路,有人说:"不要再用 OpenClaw 内置的浏览器控制了,换 PinchTab,Token 能省 13 倍。"

我试了一下,还真是。

关键是整个安装过程,甚至不用离开 OpenClaw 的对话框,今天就手把手带你走一遍。

PinchTab 是什么?

简单说:一个 12MB 的工具,让 AI Agent 通过文本而不是截图来理解网页,操控浏览器。

它用的是 Accessibility Tree(无障碍树),浏览器本身给视障用户准备的结构化数据,每个按钮、输入框、链接都有文本描述。

PinchTab 把这些提取出来喂给 AI,不用截图。

对比一下就知道差距了:

好了,废话不多说,直接开始。

第一步:在 OpenClaw 对话框里安装 PinchTab

打开你的 OpenClaw(Telegram / 终端都行),直接发一句:

帮我安装 PinchTab

OpenClaw 会自动帮你执行安装命令。

等它回复安装完成就行。

第二步:让 OpenClaw 把 PinchTab 写成 Skill

安装好之后,再发一句:

把 PinchTab 写成一个 skill,以后浏览器操作都走 PinchTab

OpenClaw 会生成一个 skill 文件,并且会告诉你这个 skills 可以实现什么功能。

这一步做完,你的 Agent 就有了一双能操控浏览器的手。

第三步:让 Agent 打开一个网页

现在来测试。发一句:

用 PinchTab 打开 https://github.com/pinchtab/pinchtab 这个页面,告诉我页面上有哪些可以点击的元素

可以看到,就这么点文本,大约只用了 800 token。

第四步:让 Agent 操作页面

试试让它点击某个元素:

点击 Star 按钮

Agent 会找到对应的元素编号。

再试试填写和搜索:

回到 GitHub 首页,搜索 "openclaw"

整个过程你只说了一句话,Agent 在后台跑了 4-5 条命令,总共消耗不到 3000 token。

第五步:抓取一个项目的信息

来点有用的,假设你想快速了解一个 GitHub 项目:

用 PinchTab 打开 https://github.com/pinchtab/pinchtab ,帮我提取这个项目的介绍文本

pinchtab text 会把页面的主要文本干净地提取出来,README 内容、Star 数、描述全都有,格式整洁。

这个能力拿来干嘛?

批量调研项目 — 给 Agent 一个 GitHub 链接列表,让它挨个提取项目信息

监控竞品 — 定期去看某个页面的变化

抓内容素材 — 做自媒体的都懂,信息搜集效率翻倍

第六步:多账号并行

如果你做出海,同时要管好几个平台的账号,PinchTab 支持多浏览器实例并行。

跟 Agent 说:

用 PinchTab 启动两个独立的浏览器实例,一个叫 twitter,一个叫 linkedin

每个实例有独立的 Cookie 和登录状态,互不干扰,登录一次后 Profile 会保存下来,下次启动不用重新登。

然后就可以让 Agent 同时在不同平台操作了:

在 twitter 实例里打开 x.com,在 linkedin 实例里打开 linkedin.com

PinchTab 的几个关键命令

给你整理一下 PinchTab 的核心命令,方便以后查:

这些命令不需要自己敲,写成 skill 之后,Agent 会自动调用,但知道它们在干嘛,debug 的时候有用。

安全提醒

PinchTab 默认只监听本机 127.0.0.1:9867,敏感接口默认关闭,还支持 API Token 认证。

如果你的 OpenClaw 部署在服务器上,记得:

设置 API Token,别让浏览器控制接口裸奔

看看官方安全指南:https://github.com/pinchtab/pinchtab/blob/main/docs/guides/security.md

最后

装 OpenClaw 的人越来越多,但很多人可能还在用默认的截图方案控制浏览器,白白多花十几倍 token。PinchTab 这个东西,12MB,零依赖,在 OpenClaw 里一句话就能装好。省下来的 token,一个月够你多跑好几个 Agent。

如果你对 OpenClaw 感兴趣,或者在实践中遇到问题,欢迎加入 OpenClaw 中文交流群。99 元入群,送 $50 aigocode.com 算力额度。群里都是实际在用 OpenClaw 的玩家,每天分享使用技巧和踩坑经验,氛围很活跃。