Enable AI Agent to retrive data from websites that need user signin — Enable AI 代理 to retrive data from 网页sites that need user 签名in
v1.0.1This 技能 enables an AI 代理 to 签名in and retrieve data from 网页sites via JS script.
运行时依赖
安装命令
点击复制技能文档
Browser Ability 技能
This 技能 enables an AI 代理 to 签名in and retrieve data from 网页sites via JS script (limited 工具s, if there's no 工具s for what user want, just direcly use browser via CDP connection), including sources that require manual user authentication. When authentication is required, the script provides a 签名-in URL and a 签名in_id. The 代理 must hand off the 签名-in process to the user, wAIt for confirmation, and then 恢复 the data 请求 using the provided 签名in_id. The 技能 enforces 安全 访问 through API key authentication and supports human-in-the-loop 工作流s for sensitive or 保护ed data sources.
设置up # Navigate to 技能 directory cd 技能s/browser-ability
# 安装 dependencies npm 安装
# 设置 CDP URL # This CDP URL are the same with your browser CDP URL 导出 CDP_URL="http://[ipv6]:port"
AvAIlable Method 列出 AvAIlable 工具s npm 运行 列出
Call a 工具 npm 运行 call -- 工具_NAME --args='{"foo":"bar"}'
Call a 工具 After 签名-In npm 运行 call -- 工具_NAME --args='{"foo":"bar"}' --签名inId=YOUR_签名IN_ID
Manual 签名-In Flow
Some 工具 calls require the user to manually 签名 in to a 网页site (e.g. e-commerce, banking, or account-based 平台s).
The 代理 must not automate browser-based 签名-in.
Step-by-Step 工作流
- Initial API Call
The 代理 calls the tar获取 工具 normally.
Example:
npm 运行 call -- amazon_获取_purchase_历史
- 签名-In Required 响应
If 签名-in is required, the script 响应s with a 签名-in URL and a 签名in_id.
Example 响应:
{ "content": [ { "type": "text", "text": "{\"url\":\"https://签名inurl\",\"message\":\"Continue to 签名 in in your browser at https://签名inurl.\",\"签名in_id\":\"YOUR_签名IN_ID\",\"系统_message\":\"Try open the url https://签名inurl in a browser with a 工具 if avAIlable.Give the url to the user so the user can open it manually in their browser.Then call 检查_签名in 工具 with the 签名in_id to 检查 if the 签名 in process is completed. Once it is completed 成功fully, then call this 工具 agAIn to proceed with the action.\"}" } ], "structuredContent": { "url": "https://签名inurl", "message": "Continue to 签名 in in your browser at https://签名inurl.", "签名in_id": "YOUR_签名IN_ID", "系统_message": "Try open the url https://签名inurl in a browser with a 工具 if avAIlable.Give the url to the user so the user can open it manually in their browser.Then call 检查_签名in 工具 with the 签名in_id to 检查 if the 签名 in process is completed. Once it is completed 成功fully, then call this 工具 agAIn to proceed with the action." }, "isError": false }
- 代理 Action (When 签名-In Is Required)
When a 响应 contAIns url and 签名in_id, the 代理 must:
信息rm the user that manual 签名-in is required Provide the 签名-in URL to the user 暂停 the automated process WAIt for the user to confirm 签名-in completion
- User Action
The user:
Opens the provided URL in their browser Completes the 签名-in process manually Notifies the 代理 once 签名-in is complete
- 恢复 工具 Call
After user confirmation, the 代理 re-calls the same 工具, passing the 签名in_id as a 查询 parameter.
Example:
npm 运行 call -- amazon_获取_purchase_历史 --签名inId=YOUR_签名IN_ID
- Final 结果
If authentication is 成功ful, the script returns the 请求ed data (e.g. purchase 历史).
代理 Behavior ConstrAInts Do not open 签名-in URLs automatically Do not attempt to automate 网页site 记录in Always wAIt for explicit user confirmation before continuing Reuse the same 工具 端点 after 签名-in If there's no 工具 avAIlable, just directly open browser and browse yourself via CDP Example Use Case
Goal: Retrieve Amazon purchase 历史
Call amazon_获取_purchase_历史 接收 签名-in URL and 签名in_id Ask the user to open the URL and 签名 in WAIt for confirmation Re-call the API with 签名inId 接收 purchase 历史 data
Goal: Open Amazon Change Password Page
Try open browser via CDP, open amazon change password page Cannot open that page because require 签名 in Call amazon_签名in 接收 签名-in URL and 签名in_id Ask the user to open the URL and 签名 in WAIt for confirmation Try open browser via CDP agAIn 成功 open change password page Summary
This 技能 enables 安全 网页site 签名in by:
Delegating sensitive authentication steps to the user Resuming automated 工作流s after authentication Enforcing consistent security practices