CLI deploy of a browser agent fails: missing StartBrowserSession in the generated role, and lost exec bit on the Playwright driver
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
This issue has not been assessed yet.
Description
Deploying a LangChain Deep Agent that uses AgentCore Browser through the CLI fails at two points. Both are in the deployment path rather than in the agent, and together they blocked me from using the CLI at all: I fell back to a boto3 deploy script, which is roughly 220 lines a sample should not need to carry.
1. The generated execution role is missing browser permissions.
An agent that calls AgentCore Browser needs bedrock-agentcore:StartBrowserSession. The role the CLI creates does not include it, so the deploy succeeds and the first invocation fails:
AccessDeniedException: User: arn:aws:sts::<account>:assumed-role/<generated-role>/...
is not authorized to perform: bedrock-agentcore:StartBrowserSession
The same agent works when the role is created by hand with that action added. Code interpreter agents are unaffected, so this looks specific to the browser tool actions being absent from the generated policy.
2. The deployment zip drops the executable bit on the Playwright driver.
With the role fixed, the browser still does not start:
PermissionError: [Errno 13] Permission denied:
'/var/task/playwright/driver/node'
playwright ships a bundled node binary that must stay executable. The zip the CLI builds appears not to preserve file modes, so the extracted binary is not executable in the runtime. Anything with a bundled executable in its wheel hits this, not only Playwright.
Reproduce
An agent built with create_deep_agent from deepagents, with subagents using create_browser_toolkit from langchain-aws, deployed with the CLI. Dependencies: langchain-aws[tools]>=1.7.6, deepagents>=0.7.13, bedrock-agentcore>=1.23.0, aws-opentelemetry-distro, opentelemetry-instrumentation-langchain. Region us-west-2, CLI 0.29.0.
Separately: --include-domains is missing for the web search connector.
translateWebSearch in src/cli/operations/connectors/translators.ts builds parameterValues.domainFilter from excludeDomains only, and there is no includeDomains anywhere in src/. The SDK's GatewayClient.create_web_search_target() accepts both include and exclude lists, so a target that restricts search to a set of trusted domains cannot be created through the CLI today. Restricting to trusted sources is the more common of the two filters in my experience.
- Dominant language
- TypeScript
- Stars
- 339
- Forks
- 129
- Avg merge
- 19h 21m
- Merged PRs (30d)
- 125
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/agentcore-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
aws/agentcore-cli#2940 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws/agentcore-cli#2939 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aws/agentcore-cli#2938 ·
Maintainers usually reply within 1 day
-
invoke: CUSTOM_JWT runtime errors discard the response body and error type (e.g. "Token has expired")Possibly taken @n1dhruv claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
aws/agentcore-cli#2875 · 1 comment ·
Maintainers usually reply within 1 day
-
--debug has no effect; service error name, HTTP status and request ID never reach the terminalPossibly taken @abhiramshaji-cyber claimed this 3 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws/agentcore-cli#2874 ·
Maintainers usually reply within 1 day
All issues in aws/agentcore-cli
Similar issues
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
ranxianglei/billion-context#7860 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
agent-oc-find-bugs api complexity → simple payment-methods recurring contributions reviewed stripe
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opencollective/opencollective#9177 ·