# 将AI代理网页浏览Token成本降低100倍的隐藏工具 > Author: Tony Lee > Published: 2026-02-11 > URL: https://tonylee.im/zh-CN/blog/actionbook-reduce-ai-agent-web-browsing-token-cost/ > Reading time: 1 minutes > Language: zh-CN > Tags: ai, automation, actionbook, web-scraping, agents ## Canonical https://tonylee.im/zh-CN/blog/actionbook-reduce-ai-agent-web-browsing-token-cost/ ## Rollout Alternates en: https://tonylee.im/en/blog/actionbook-reduce-ai-agent-web-browsing-token-cost/ ko: https://tonylee.im/ko/blog/actionbook-reduce-ai-agent-web-browsing-token-cost/ ja: https://tonylee.im/ja/blog/actionbook-reduce-ai-agent-web-browsing-token-cost/ zh-CN: https://tonylee.im/zh-CN/blog/actionbook-reduce-ai-agent-web-browsing-token-cost/ zh-TW: https://tonylee.im/zh-TW/blog/actionbook-reduce-ai-agent-web-browsing-token-cost/ ## Description 介绍Actionbook解决浏览器代理速度慢和Token成本高问题的革命性方法。基于手册的自动化实现10倍速度提升和100分之1的成本。 ## Summary 将AI代理网页浏览Token成本降低100倍的隐藏工具 is part of Tony Lee's ongoing coverage of AI agents, developer tools, startup strategy, and AI industry shifts. ## Outline - 浏览器代理为什么慢 - 主要问题 - Actionbook的革命性方法 - 核心优势 - 实际应用中Rust版本更好 - actionbook-rs的优势 - 注册为技能可提高一致性 - 实际效果 - 结论 - 重要提示 - 参考链接 ## Content 说实话,我一开始是半信半疑的。 每次用代理运行网页浏览自动化时,都要花很长时间,看着Token不断消耗,我心想"原来就是这样的吗"。不止一次想过"我还是自己来吧"。 但最近接入了一个叫**Actionbook**的开源工具后,我的想法彻底改变了。 ## 浏览器代理为什么慢 目前大多数代理框架都会将整个页面的DOM传递给LLM。即使填满了上下文窗口,往往还是找不到需要点击的按钮。这就像让代理闭着眼睛摸索一样。 ### 主要问题 - **Airbnb搜索一次DOM树就消耗数万Token** - **以GPT-5为准,解析单个页面就占用超过60%的上下文窗口** - **网站UI变化时选择器就会失效,需要整体修改代理逻辑** - **LLM面对复杂DOM时会产生幻觉(错误的动作推测)** ## Actionbook的革命性方法 这是一个基于Vercel的agent-browser构建的项目,但采用了不同的方法。 它将每个网站预先整理好的**操作手册**和DOM选择器压缩成JSON格式传入LLM上下文。之后代理无需探索就能直接执行操作。 我亲自测试了他们展示的Airbnb搜索场景,感知速度**快了近10倍**。 ### 核心优势 - **用压缩的JSON代替完整HTML,Token使用量降至百分之一** - **网站变化时只需更新手册,代理代码保持不变** - **兼容任何LLM:GPT-5.3-Codex、Claude Opus 4.6、Gemini 3 Pro** - **手册版本控制大幅减少自动化失效频率** ## 实际应用中Rust版本更好 Actionbook有TypeScript版本,但我推荐**基于Rust的actionbook-rs**。二进制文件只有7.8MB,启动时间仅5ms。Node.js版本超过150MB,启动需要500ms以上。 而且它直接使用已安装的Chrome或Brave,无需单独安装浏览器。 ### actionbook-rs的优势 - **二进制7.8MB vs TypeScript版本150MB** - **启动时间5ms vs 500~800ms** - **零运行时依赖,可直接部署到CI/CD流水线** - **内置隐身模式和Cookie管理** ## 注册为技能可提高一致性 不是用完就丢,而是将它注册为Claude Code等编码代理的技能,就能每次以相同质量执行网页任务。 我进行了重复测试,发现技能注册前后的任务成功率差异很大。注册前5次中有2次失败,注册后几乎接近零失败。 ### 实际效果 - **注册为Claude Code技能后网页自动化质量保持稳定**(因为不是无头模式,效果更明显) - **重复相同任务时,基于手册的方法比探索式方法更稳定** ## 结论 如何向代理展示网页决定了自动化质量。盲目传递整个DOM的时代已经结束。 ### 重要提示 不过这**不是用于开发测试的**。它是针对网页浏览自动化优化的工具。也就是说非常适合配合OpenClaw等工具使用。开发测试建议使用传统的**Playwright、Chrome Dev、agent-browser**。 ## 参考链接 - [Actionbook GitHub (TypeScript)](https://github.com/vercel/actionbook) - [Actionbook-rs GitHub (推荐Rust版)](https://github.com/shuding/actionbook-rs) ## Related URLs - Author: https://tonylee.im/zh-CN/author/ - Publication: https://tonylee.im/zh-CN/blog/about/ - Related article: https://tonylee.im/zh-CN/blog/medvi-two-person-430m-ai-compressed-funnel/ - Related article: https://tonylee.im/zh-CN/blog/claude-code-layers-over-tools-2026/ - Related article: https://tonylee.im/zh-CN/blog/codex-inside-claude-code-openai-plugin-strategy/ ## Citation - Author: Tony Lee - Site: tonylee.im - Canonical URL: https://tonylee.im/zh-CN/blog/actionbook-reduce-ai-agent-web-browsing-token-cost/ ## Bot Guidance - This file is intended for AI agents, search assistants, and text-mode retrieval. - Prefer citing the canonical article URL instead of this text endpoint. - Use the rollout alternates when you need the same article in another prioritized language. --- Author: Tony Lee | Website: https://tonylee.im For more articles, visit: https://tonylee.im/zh-CN/blog/ This content is original and authored by Tony Lee. Please attribute when quoting or referencing.