Skip to main content
Glama

strawmanus

一个浏览器控制代理,融合了 Manus 的动作层Strawberry 的会话、选择器与复用层

Manus 拥有更好的 :扁平的 12 工具浏览器 API、元素检测失败时的坐标回退、JS 控制台逃生舱、以 Markdown 为先的感知,以及严格的每次迭代一个工具循环。Strawberry(Dendrite Systems)拥有更好的 身体和记忆:它在您真实登录的浏览器中运行,从自然语言解析元素并缓存结果,从而在网站变化时自我修复,将成功的任务保存为可重放的技能,并在执行任何不可逆操作前询问。

两者单独都无法工作。Manus 在每次重复任务时都会重新支付全部模型成本,并且在一次性的 Linux 沙箱中运行,结构上无法越过登录墙。Strawberry 是封闭的,不暴露任何可编程的原语。strawmanus 是两者的结合:Manus 的动作空间,在您自己的 Chrome 中驱动,每个元素解析都被缓存。


安装

pip install -r requirements.txt && playwright install chromium

observe 无需 API 密钥即可工作。所有模型驱动的内容都需要一个:

export ANTHROPIC_API_KEY=sk-ant-...

然后检查环境:

python -m strawmanus doctor

Related MCP server: agent-browser-mcp

使用

# See exactly what the agent sees — no API key, no model call
python -m strawmanus observe --url https://github.com/trending

# Run a task
python -m strawmanus run "top 5 trending TypeScript repos today, 2 sources per fact" --expect 5

# Log in once by hand; later headless runs inherit the session
python -m strawmanus auth --url linkedin.com

# Save a successful run as a skill, then replay it with new arguments
python -m strawmanus run "search for Acme Corp" --save-skill find-co --param company="Acme Corp"
python -m strawmanus replay find-co --arg company="Globex Inc"

# Fan subtasks across tabs (they share the logged-in browser)
python -m strawmanus companions "price Linear" "price ClickUp" "price Asana"

# Score against the seat-free Strawberry benchmarks
python -m strawmanus bench --tasks B9,B12 --judge --csv scores.csv

全局标志:--profile {cloned,real,fresh,attach} · --headless · --max-steps N · --auto-approve · --allow DOMAIN · --parallel N · --cdp URL

状态存储在 ~/.strawmanus/ 中:sm.db(选择器缓存、记忆、运行日志)、skills/runs/<stamp>-<slug>/{report.md,trace.json,guard.json}profile/


工作原理

1. 感知是单个负载中的三层

[page] url=https://github.com/trending | title='Trending repositories on GitHub today · GitHub' | viewport 1/3 | tabs=1

[interactive] (viewport only; use index, or coordinate_x/coordinate_y for anything missing)
  0[:]<a>Homepage</a>
  1[:]<button>Platform</button>
  ...
  52[:]<a>obra / superpowers</a>
  53[:]<a>275,441</a>
  60[:]<a>You must be signed in to star a repository</a>

[markdown] (whole page, links/images stripped — if this answers the question, do not scroll)
# Trending
## RyanCodrai / turbovec
A vector index built on TurboQuant, written in Rust with Python bindings
348 stars today
...

交互元素仅限视口,采用 Manus 精确的 index[:]<tag>text</tag> 格式,通过 elementFromPoint 进行命中测试,从而丢弃被遮挡的控件。Markdown 覆盖整个文档,包括折叠线以下的内容——这是真正的成本杠杆,因为大多数只读问题无需滚动即可回答。截图是可选加入的,用于 DOM 确实模糊的情况。

密码、OTP 和卡片字段会被索引以便填写,但其文本和值永远不会进入模型的上下文:

  4[:]<input type=password><redacted secret field></input>

2. Manus 的 12 个工具,逐字保留——外加 5 个

browser_view · browser_navigate · browser_restart · browser_click · browser_input · browser_move_mouse · browser_press_key · browser_select_option · browser_scroll_up · browser_scroll_down · browser_console_exec · browser_console_view

名称被完全保留,因为模型已经对它们进行了泛化,Manus 已发布的行为规则也随之直接转移。在此基础上添加:

工具

原因

browser_find(description) → index

自然语言选择器,缓存优先

browser_wait_for(description)

语义等待,而非睡眠循环

browser_extract(description, schema)

类型化提取,自动归档其来源 URL

browser_tabs(action, target)

list / open / switch / close

browser_takeover(reason)

2FA、验证码、支付——将键盘交还

点击会升级而非死胡同:索引 → 快照 bbox 的坐标 → browser_console_execbrowser_takeover。页面上连续三次失败会将升级阶梯注入循环。

3. 选择器缓存是最大的胜利

(domain, normalized description){selector, fingerprint{tag, role, text_hash}, hits, misses} 存储在 SQLite 中。

解析顺序:缓存命中 → 验证指纹 → 使用它,零模型调用。在不匹配或未命中时,模型从元素列表中选择一个索引,并重写缓存——这是 Dendrite 的自我修复,Manus 没有等价物。在健康页面上重放技能完全不消耗模型调用strawmanus cache 显示已积累的内容。

4. 真实浏览器优先

默认是 strawmanus 拥有的持久 Chrome 配置文件——真实 cookie、登录墙已解决、任何地方都不存储凭据。--profile real 使用您的实际配置文件(Chrome 必须关闭),--profile attach 连接到您自己在 --remote-debugging-port=9222 上启动的 Chrome,--profile fresh 提供干净的环境以实现可复现的基准测试。strawmanus auth --url <site> 是 Dendrite 模式:您手动登录一次,存储状态被保存以供后续无头运行。

5. 没有不可逆的事情会悄悄发生

每个动作在分派前都被分类为读取 / 软写入 / 不可逆。发送、提交、支付、删除、发布、申请、订阅、转账、合并、推送——以及在撰写字段中按 Enter——都会保留以进行确认,并预览目标和负载:

  ⚠  irreversible action held for confirmation
     what: click 'Send invoice' on x.com
      why: click target text contains 'send'
     approve? [y/N]

--auto-approve 仅适用于通过 --allow 传递的域。保留的动作在报告中列为“保留供您批准(未执行)”,因此被阻止的步骤是可见的,而不是悄悄缺失。每个决策都写入 guard.json

6. 没有来源的事实无法打印

Strawberry 的基准评分标准在运行时强制执行,而不是事后评分。事实进入账本,并附有实际读取的 URL;搜索引擎结果页被拒绝作为来源,模型被告知打开真实页面。置信度是机械的——高(2 个以上官方来源)、中(1 个)、低(推断)——并且 report.render() 抛出异常,而不是发出零来源声明。报告以固定的状态行、阻塞项、遥测数据和代理的自我评级自主性结束:

**Status:** Complete | **Entities Found:** 5/5 | **Duration:** 6.2 min

7. 技能与同伴

成功的轨迹被提炼为参数化技能:噪声工具被丢弃,字面参数值被替换为 {{param}},元素文本被保留,以便每个步骤在重放时都能重新定位。同伴在信号量后面将子任务分散到多个标签页,每个标签页都有自己的事件流,共享同一个已登录的浏览器。


直接将浏览器交给 Claude

以上所有内容都从 CLI 驱动代理。serve-mcp 将其反转:浏览器成为 Claude 在对话中持有的工具,一个持久的 Chrome 在轮次之间保持打开,通过工具调用逐次驱动,推理发生在聊天中,而不是脚本化循环中。

claude mcp add strawmanus -- python -m strawmanus serve-mcp

手工编写的 JSON-RPC 2.0 over stdio,无额外依赖。全部 17 个浏览器工具加上 9 个交易工具。Chrome 在第一次工具调用时启动,而不是在注册时启动,因此添加服务器不会弹出窗口。browser_takeover 立即返回,而不是阻塞在 input() 上——这里 stdin 是协议通道,阻塞会导致服务器死锁;相反,模型会停止并在对话中询问您。

交易工具针对 Olymp Trade,并带有算术层、记录每笔交易背后推理的日志,以及在推理层之下在代码中强制执行的风险限制,因此拒绝是最终的。设计假设是“没有优势”是可能的答案,演示证据门的存在是为了让这个答案可达:真实资金要求 95% Wilson 区间的下限超过盈亏平衡点,而不是点估计。一个 120 笔交易的演示记录,胜率 61.7%,盈利 146.80,仍然报告 edge proven NO

TRADING.md 提供了完整图景,包括您在将其指向真实资金之前应阅读的 ToS 和结构性风险。


基准测试

bench/tasks.json 包含 Strawberry 已发布的 B1–B12 规范中无需付费席位即可运行的 9 个任务(B6–B8 需要 LinkedIn Sales Navigator / CRM / ATS 访问权限),按其评分标准评分——数据准确性 35、来源质量 25、完整性 25、洞察力 10、速度 5——减去一个惩罚表,最高为每个虚构数据点 −20。

每个基准测试运行两遍。机械遍不需要模型,并捕获实际出错的地方:无来源事实、单一来源事实、实体不足、超出时间估计、模糊的数字语言。--judge 遍随后使用单独的模型调用进行评分,该调用只看到生成的 Markdown——代理从不给自己的作业评分。

测试

python tests/test_core.py    # 33 offline: no browser, no network, no API key
python tests/test_live.py    # 6 end-to-end: real headless Chrome, scripted stub model

实时套件在真实 DOM 上运行整个堆栈,模型被脚本替换,这使得不变量无需密钥即可检查:快照 JS 针对真实 HTML,守卫拒绝 Send invoice 而允许 Show details(在页面自身状态上断言,而非返回值),缓存从冷到热且模型调用次数保持平稳,每次迭代一个工具调用,片段来源被拒绝并报告,以及使用新参数重放技能。

布局

strawmanus/
  cli.py  config.py  loop.py  llm.py
  prompts/system.md          # agent loop, browser, information, safety, deliverable rules
  browser/
    session.py   # CDP attach / persistent profile / fresh context, tabs, storage state
    observe.py   # the three-layer observation
    actions.py   # Manus's 12 + 5, on Playwright
    selectors.py # NL selector → cache → fingerprint verify → self-heal
    guard.py     # risk classifier, confirm gate, secret redaction
  memory/
    store.py     # SQLite: prefs, per-domain quirks, run log
    skills.py    # trace → parameterized skill; replay with relocation
  research/
    sourcing.py  # citation ledger
    report.py    # the deliverable contract
  bench/
    tasks.json  judge.py

尚未构建

触发器(从 Gmail 标签或 GitHub PR 触发技能)、MCP 连接器和 Manus 的文件工具已设计但未实现。模型驱动循环已针对脚本化存根进行了端到端测试,但尚未针对实时 API 密钥进行测试。

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Transforms Chrome browser into an AI-controlled automation tool that allows AI assistants like Claude to access browser functionality, enabling complex automation, content analysis, and semantic search while preserving your existing browser environment.
    MIT
  • A
    license
    B
    quality
    F
    maintenance
    Enables AI agents to directly control your real Chrome browser with full context including login sessions, cookies, and open tabs. It provides tools for page scanning, JavaScript execution, CDP control, screenshots, and physical mouse/keyboard input for authentic browser automation.
    20
    241
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Enables controlling a real Chrome browser from MCP hosts like Claude, with extension-based or CDP fallback, supporting tabs, navigation, interaction, and page reading tools.
    33
    40
    5
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables browser automation through the Claude Chrome Extension, allowing agents to navigate websites, fill forms, take screenshots, and debug web apps via standard MCP protocols.
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/painbaba/strawmanus'

If you have feedback or need assistance with the MCP directory API, please join our Discord server