agentcore
它能做什么
这个技能让 agent-browser 在亚马逊的 AgentCore 云服务上运行浏览器会话。适合已经在使用 AWS、想要托管云端浏览器的人。
适用场景
- ✓当你希望浏览器自动化在 AWS 基础设施上运行,而不是在你的电脑上的时候。
- ✓当你已有 AWS 凭证,需要一个托管浏览器会话的时候。
- ✓当你希望浏览器配置文件在会话之间保留 cookies 和登录状态的时候。
技能链接
https://github.com/vercel-labs/agent-browser/blob/main/skill-data/agentcore/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我在 AWS 上运行浏览器检查,这样我的电脑上就不需要打开 Chrome?”
每周 5 个新技能,1 分钟读完。
工作原理
它会自动查找你的 AWS 凭证,打开一个云端浏览器,然后使用与本地浏览器相同的快照和点击命令。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
AWS Bedrock AgentCore
Run agent-browser on cloud browser sessions hosted by AWS Bedrock AgentCore. All standard agent-browser commands work identically; the only difference is where the browser runs.
Setup
Credentials are resolved automatically:
- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, optionallyAWS_SESSION_TOKEN) - AWS CLI fallback (
aws configure export-credentials), which supports SSO, IAM roles, and named profiles
No additional setup is needed if the user already has working AWS credentials.
Core Workflow
# Open a page on an AgentCore cloud browser
agent-browser -p agentcore open https://example.com
# Everything else is the same as local Chrome
agent-browser snapshot -i
agent-browser click @e1
agent-browser screenshot page.png
agent-browser close
Environment Variables
| Variable | Description | Default |
|---|---|---|
AGENTCORE_REGION |
AWS region | us-east-1 |
AGENTCORE_BROWSER_ID |
Browser identifier | aws.browser.v1 |
AGENTCORE_PROFILE_ID |
Persistent browser profile (cookies, localStorage) | (none) |
AGENTCORE_SESSION_TIMEOUT |
Session timeout in seconds | 3600 |
AWS_PROFILE |
AWS CLI profile for credential resolution | default |
Persistent Profiles
Use AGENTCORE_PROFILE_ID to persist browser state across sessions. This is useful for maintaining login sessions:
# First run: log in
AGENTCORE_PROFILE_ID=my-app agent-browser -p agentcore open https://app.example.com/login
agent-browser snapshot -i
agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password"
agent-browser click @e3
agent-browser close
# Future runs: already authenticated
AGENTCORE_PROFILE_ID=my-app agent-browser -p agentcore open https://app.example.com/dashboard
Live View
When a session starts, AgentCore prints a Live View URL to stderr. Open it in a browser to watch the session in real time from the AWS Console:
Session: abc123-def456
Live View: https://us-east-1.console.aws.amazon.com/bedrock-agentcore/browser/aws.browser.v1/session/abc123-def456#
Region Selection
# Default: us-east-1
agent-browser -p agentcore open https://example.com
# Explicit region
AGENTCORE_REGION=eu-west-1 agent-browser -p agentcore open https://example.com
Credential Patterns
# Explicit credentials (CI/CD, scripts)
export AWS_ACCESS_KEY_ID=AKIA...
export AWS_SECRET_ACCESS_KEY=...
agent-browser -p agentcore open https://example.com
# SSO (interactive)
aws sso login --profile my-profile
AWS_PROFILE=my-profile agent-browser -p agentcore open https://example.com
# IAM role / default credential chain
agent-browser -p agentcore open https://example.com
Using with AGENT_BROWSER_PROVIDER
Set the provider via environment variable to avoid passing -p agentcore on every command:
export AGENT_BROWSER_PROVIDER=agentcore
export AGENTCORE_REGION=us-east-2
agent-browser open https://example.com
agent-browser snapshot -i
agent-browser click @e1
agent-browser close
Common Issues
"Failed to run aws CLI" means AWS CLI is not installed or not in PATH. Either install it or set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY directly.
"AWS CLI failed: ... Run 'aws sso login'" means SSO credentials have expired. Run aws sso login to refresh them.
Session timeout: The default is 3600 seconds (1 hour). For longer tasks, increase with AGENTCORE_SESSION_TIMEOUT=7200.
常见问题
我需要做什么设置吗?
技能说明,如果你的 AWS 凭证已经可用,就不需要额外设置。
使用哪个 AWS 区域?
默认是 us-east-1,但你可以通过 AGENTCORE_REGION 设置更改。
会话能保留登录状态吗?
可以。持久配置文件 ID 可以在会话之间保留 cookies 和 localStorage。
详情
作者的原始描述
Run agent-browser on AWS Bedrock AgentCore cloud browsers. Use when the user wants to use AgentCore, run browser automation on AWS, use a cloud browser with AWS credentials, or needs a managed browser session backed by AWS infrastructure. Triggers include "use agentcore", "run on AWS", "cloud browser with AWS", "bedrock browser", "agentcore session", or any task requiring AWS-hosted browser automation.
热度
- GitHub 星标
- 45k
- 排名
- #6355
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/1
评论
- …