Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ad7dda3
test(e2e): Deploy and invoke every Strands Box template
mquang-amazon Nov 18, 2026
6ca1d00
test(e2e): Cover the two box templates outside CI
mquang-amazon Nov 18, 2026
204da9e
test(e2e): Skip dev for the box template cases
mquang-amazon Nov 18, 2026
7d45b88
test(e2e): Run the CodeZip box template on each Runtime Python
mquang-amazon Nov 18, 2026
8d5f619
test(e2e): Address the review of #2865
mquang-amazon Nov 19, 2026
dacbf9c
test(e2e): Wait before the Box error check, and say what box runs
mquang-amazon Nov 20, 2026
a3326d8
fix(box): keep a box another process installed into the shared cache
mquang-amazon Nov 19, 2026
83ab787
test(e2e): Run agentcore dev for every Strands Box template
mquang-amazon Nov 20, 2026
61458ca
test(e2e): Skip the Strands Box tests when no box runs from PATH
mquang-amazon Nov 20, 2026
216710c
Merge remote-tracking branch 'origin/box-integration' into box/mq-7
mquang-amazon Nov 20, 2026
2e704fc
test(e2e): Gate the Box deploy cases on a Box-capable CDK
mquang-amazon Nov 20, 2026
d6a007e
Merge remote-tracking branch 'origin/box-integration' into box/mq-7
mquang-amazon Nov 20, 2026
2e455e3
fix(box): Start box from agentcore.json's code folder, not a comment
mquang-amazon Nov 20, 2026
21e2c91
fix(box): Start every CodeZip box in its code folder, with no fallback
mquang-amazon Nov 20, 2026
acb9b4c
fix(box): Stop start.py on a policies line it cannot read on 3.10
mquang-amazon Nov 20, 2026
ad4617d
fix(box): Keep upsert's first snapshot, and say which GITHUB_TOKEN bu…
mquang-amazon Nov 20, 2026
5a6a441
test(e2e): Wait for the invoke's own log line before the error check
mquang-amazon Nov 20, 2026
f7391f2
docs(box): Drop the troubleshooting item for earlier branch builds
mquang-amazon Nov 20, 2026
96c63bd
test(box): find Python on Windows without throwing
mquang-amazon Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions docs/box-local-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ npm install "$L3"/aws-agentcore-cdk-*.tgz
Export `GITHUB_TOKEN` before build. Build reads it and writes its value into
`agentcore/.env.local` under the credential's reserved name `AGENTCORE_CREDENTIAL_GITHUB`.
On a later build it replaces that value when `GITHUB_TOKEN` holds a different key, as after a
rotation, so deploy provisions the key `agentcore dev` uses. A build with `GITHUB_TOKEN` unset
keeps the stored key.
rotation, so deploy provisions the key `agentcore dev` uses. Build reads `GITHUB_TOKEN` as dev
does: from your shell, or from `agentcore/.env.local` when the shell has none. So a
`GITHUB_TOKEN` line in `agentcore/.env.local` replaces the stored key too, even with an older
key; keep the key in one place. With `GITHUB_TOKEN` in neither, build keeps the stored key.

```
cd "$DEMO/$PROJECT"
Expand Down Expand Up @@ -221,10 +223,5 @@ bun run "$CLI" deploy
- **Deploy says a credential has no secret.** The credential's value did not reach
`agentcore/.env.local`. Export `GITHUB_TOKEN` and run build again, or set
`AGENTCORE_CREDENTIAL_GITHUB` in the deploy environment.
- **`agentcore dev` uses an old key when the shell sets none.** Earlier builds of the
box-integration branches copied each box variable into `agentcore/.env.local`, under a
`# Key for box egress '<route>' (env://<VAR>), read by box under agentcore dev` comment, and
dev still reads it there. Delete those lines (the comment and the `<VAR>=` line under it), then
export the variable in your shell instead.
- **The CDK app uses the published constructs, not yours.** Redo step 5. Confirm with
`cat agentcore/cdk/node_modules/@aws/agentcore-cdk/package.json`.
36 changes: 36 additions & 0 deletions e2eTest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,39 @@ run through a shell, so paths containing spaces, quoting, and shell syntax are n
```sh
AGENTCORE_CLI_PATH=/path/to/agentcore bun run test:e2e
```

The `box` tests cover the Strands Box templates, which run their agent in a box. They deploy and
invoke each one on AgentCore Runtime, and run `agentcore dev` with one local invoke for each. They
are optional and need a `box` on your PATH: `create` checks for one for a CodeZip box template, and
`build` and `deploy` run `box profile show` for every Box template, the container one too. Without
one, they skip. `create` also installs the agent's dependencies and the CDK app's, which `dev` and
`deploy` use, so the tests don't pass `--skip-install`.

The tests that deploy also need `AGENTCORE_E2E_BOX_CDK`: the pinned `@aws/agentcore-cdk` release
cannot deploy a Box project yet. Set it to an `@aws/agentcore-cdk` version or a `file:` tarball
that can, for example one packed from the `box-integration` branch of
[agentcore-l3-cdk-constructs](https://github.com/aws/agentcore-l3-cdk-constructs) with
`npm run build && npm pack --ignore-scripts`. The tests install it in each Box project's
`agentcore/cdk`. Without it, as in CI, they skip.

The `dev` tests also need a machine where `box run` can start its sandbox, and for the container
template a container tool. Box listens on the protocol's fixed port (8080, 8000 or 9000), so the
`dev` tests run one at a time and need those ports free:

```sh
AGENTCORE_E2E_BOX_CDK=file:/path/to/aws-agentcore-cdk-1.1.0.tgz bun run test:e2e -- --tagsFilter='box'
```

That runs each Box template on its default Python. The CodeZip box template on Python 3.10 to 3.13
(`py_strands_box_3_10` to `py_strands_box_3_13`) is in the runtime templates describe, so it runs
with `--tagsFilter='runtime'` or a full run, given `box` and the same opt-in. Those four cases

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that #2867 has merged, the sentence saying the four per-Python cases pass only once it lands can go.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #2886 (89b4acf): the sentence is removed.

pass only once box runs CodeZip agents without the ffi shim (#2867): until then `boxRelease.json`
pins a shim for `PYTHON_3_14` only, so they fail on any machine.

The `box-egress` test checks that box, under `agentcore dev`, lets the agent reach the host its
profile allows (`checkip.amazonaws.com`) and blocks any other (`example.com`). It reaches public
hosts, so the network can make it fail. It retries twice, and `--tagsFilter='box'` leaves it out:

```sh
bun run test:e2e -- --tagsFilter='box-egress'
```
2 changes: 2 additions & 0 deletions e2eTest/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export const E2E_PREFIX = "e2e";

export const TAGS = {
BOX: "box",
BOX_EGRESS: "box-egress",
CANARY: "canary",
HARNESS: "harness",
RUNTIME: "runtime",
Expand Down
Loading
Loading