ClawMe — Execute Actions in User's Real Browser
Send instructions to the user's Chrome browser via the ClawMe extension. The user sees each instruction in a side panel and clicks "Execute" to confirm. Unlike headless browsers, ClawMe runs in the user's real browser with their actual login sessions.
Setup: User installs ClawMe Chrome extension, configures Backend URL and Token.
How to Send Instructions
Use the clawme_send tool if available. Otherwise, make an HTTP POST:
CODEBLOCK0
Instruction Types
compose_tweet
When user says "tweet about...", "post on X..."
CODEBLOCK1
compose_email
When user says "write email to...", "send email..."
CODEBLOCK2
fill_form
When user says "fill the form...", "enter my info..."
{"type":"fill_form","payload":{"url":"https://example.com/form","fields":{"#name":"John","input[name=email]":"john@example.com","select[name=country]":"US"}}}
Supports: inputs, textareas, selects, checkboxes, radio, contenteditable (Xiaohongshu, Medium). Use CSS selectors as field keys. Omit
url for current page.
click
When user says "click the button...", "submit the form..."
CODEBLOCK4
extract
When user says "get the text from...", "scrape..."
{"type":"extract","payload":{"selector":".results","url":"https://example.com/search"}}
Result (extracted text) is reported back to the agent.
open_url
CODEBLOCK6
remind
CODEBLOCK7
Multi-Step Workflows
Chain instructions with meta.workflow_id and meta.step:
POST /v1/instructions — {"target":"browser","instruction":{"type":"open_url","payload":{"url":"..."}}, "meta":{"workflow_id":"signup","step":1}}
POST /v1/instructions — {"target":"browser","instruction":{"type":"fill_form","payload":{"fields":{...}}}, "meta":{"workflow_id":"signup","step":2}}
POST /v1/instructions — {"target":"browser","instruction":{"type":"click","payload":{"selector":"button[type=submit]"}}, "meta":{"workflow_id":"signup","step":3}}
User sees a workflow card with progress bar and can execute all steps sequentially.
Environment Variables
- -
CLAWME_CLIENT_TOKEN (required) — matches the token configured in the Chrome extension - INLINECODE5 (optional) — default
https://api.clawme.net, or http://127.0.0.1:31871 for local
ClawMe — 在用户真实浏览器中执行操作
通过ClawMe扩展向用户的Chrome浏览器发送指令。用户在侧边栏中查看每条指令,并点击执行进行确认。与无头浏览器不同,ClawMe在用户的真实浏览器中运行,使用其实际登录会话。
设置:用户安装ClawMe Chrome扩展,配置后端URL和令牌。
如何发送指令
如果可用,使用clawme_send工具。否则,发送HTTP POST请求:
POST ${CLAWMEBASEURL:-https://api.clawme.net}/v1/instructions
请求头:Content-Type: application/json, X-ClawMe-Token: ${CLAWMECLIENTTOKEN}
请求体:{target:browser,instruction:{type:<类型>,payload:{...}}}
指令类型
compose_tweet
当用户说发推文关于...、在X上发布...
json
{type:compose_tweet,payload:{text:推文内容}}
compose_email
当用户说写邮件给...、发送邮件...
json
{type:compose
email,payload:{to:email@example.com,subject:主题,body:正文内容,usegmail:true}}
fill_form
当用户说填写表单...、输入我的信息...
json
{type:fill_form,payload:{url:https://example.com/form,fields:{#name:John,input[name=email]:john@example.com,select[name=country]:US}}}
支持:输入框、文本域、下拉选择、复选框、单选按钮、可编辑内容(小红书、Medium)。使用CSS选择器作为字段键。省略url则针对当前页面。
click
当用户说点击按钮...、提交表单...
json
{type:click,payload:{selector:button[type=submit],url:https://example.com/form}}
extract
当用户说获取文本从...、抓取...
json
{type:extract,payload:{selector:.results,url:https://example.com/search}}
结果(提取的文本)会返回给代理。
open_url
json
{type:open
url,payload:{url:https://example.com,innew_tab:true}}
remind
json
{type:remind,payload:{title:会议,body:团队站会5分钟后开始}}
多步骤工作流
使用meta.workflow_id和meta.step链接指令:
POST /v1/instructions — {target:browser,instruction:{type:openurl,payload:{url:...}}, meta:{workflowid:signup,step:1}}
POST /v1/instructions — {target:browser,instruction:{type:fillform,payload:{fields:{...}}}, meta:{workflowid:signup,step:2}}
POST /v1/instructions — {target:browser,instruction:{type:click,payload:{selector:button[type=submit]}}, meta:{workflow_id:signup,step:3}}
用户会看到带有进度条的工作流卡片,可以依次执行所有步骤。
环境变量
- - CLAWMECLIENTTOKEN(必需)— 与Chrome扩展中配置的令牌匹配
- CLAWMEBASEURL(可选)— 默认为https://api.clawme.net,本地使用http://127.0.0.1:31871