Before you start
- A region with AgentCore Runtime. The Connect dialog lists the regions you can pick, whichever platform you choose. AgentCore Runtime is not offered on platform V2 for arm64 in US West (N. California), Asia Pacific (Hyderabad), the China regions or AWS GovCloud, so those regions can’t host a connection.
- Permission to create IAM roles and an ECR repository in that account, for whoever runs the setup stack: you, or the AWS CLI profile your coding agent uses.
- AgentCore quotas. A new account’s default Bedrock AgentCore quotas are enough for one workspace. If the account already runs AgentCore agents, check Service Quotas → Amazon Bedrock AgentCore for concurrent sessions and runtimes.
- A Mutagent workspace in which you can change the configuration.
Two IDs
Each connection has two IDs. Keep them apart:What gets created
One CloudFormation stack,mutagent-sandbox-<short-id>, in the region you pick. It creates three
resources, each named with the connection’s short ID:
Runtimes are not part of the stack: Mutagent creates them later, one connection’s runtimes all named
mtgc_<short-id>_….
The downloaded template is the exact definition of these resources, with every setting and
permission: review it, or reproduce it with your own tooling. You get it through a private link
that works for one hour (see Connect with your coding agent).
Each connection also has an ExternalId, a value Mutagent generates for it. Mutagent presents it
whenever it uses the controller role, which ties the role to your connection.
Connect with your coding agent
This is the quickest way. Your coding agent needs the AWS CLI, signed in to the account you are connecting.1
Start the connection
In the web app, open Configuration → Sandbox Providers and press Connect AWS account on the
AWS Bedrock AgentCore card. Enter a name and pick a region. Leave the platform on V2
unless you have a reason to pick V1 (see Platform V2 or V1).
2
Copy the setup prompt
Press Copy setup prompt and paste it into your coding agent (Claude Code, or any agent that
can run the AWS CLI). The prompt names the connection and the region and fills in every value the
stack needs. The template itself is private: the prompt carries a presigned link to it that works
for one hour. If it has expired, press Continue setup on the connection’s card, or run
mutagent sandbox providers setup '<connection-id>', for a fresh one. Don’t connect again for a fresh
link: that creates a second connection. The agent reads the downloaded template, shows you a
short summary of what it creates and asks you before it creates anything.3
Let the agent run it
The agent checks which AWS account it is signed in to, deploys the setup stack with
aws cloudformation deploy, waits for it, reads ControllerRoleArn and verifies the connection
with mutagent sandbox providers verify. If it can’t run the Mutagent CLI, it gives you the ARN:
press I have the role ARN in the dialog, paste it into the Controller role ARN field and
press Verify.4
Wait for ready
While it is open, the dialog follows the connection. Once it is verified, Mutagent copies the sandbox image into
your repository, and the dialog shows Verified. Copying the sandbox image to your account…,
then Verified. Ready to run sandboxes. If the copy fails, it shows Verified. Image copy
failed: retry it on the card. The connection’s card is on the same page, under Connections,
in the AWS Bedrock AgentCore group. It shows Copying image (
syncing), then Ready
(ready), and sandboxes can start there. Until it is Ready, a launch on it is refused with
SANDBOX_CONNECTION_NOT_READY. See Use the connection to make it the default.connect. Its JSON output carries the connection’s ID
(id), the ExternalId, the setup prompt (setup.agentPrompt), the quick-create link
(setup.quickCreateUrl) and the template link (setup.templateUrl). Both links are valid for one
hour. mutagent sandbox providers setup '<connection-id>' prints the setup again with fresh links
while the connection is pending, error or revoked:
Connect in the AWS console
If you’d rather click through it yourself:1
Start the connection
Press Connect AWS account on the AWS Bedrock AgentCore card, as above.
2
Create the stack
Press Open AWS setup. The AWS console opens CloudFormation’s quick-create page with the
template and all its parameters filled in by the link. Review it, acknowledge that it creates IAM
roles with custom names, and press Create stack. Download template gives you the same file to review, or to apply your own way (see Connect with your own tooling).
3
Verify
When the stack is complete, copy its
ControllerRoleArn output, press I have the role ARN,
paste it into the Controller role ARN field and press Verify.Connect with your own tooling
The setup prompt and the Open AWS setup link create the resources with CloudFormation. If you manage your infrastructure elsewhere (Terraform, your own pipeline), create them there instead:- Press Connect AWS account and continue to the setup step, as above. Press Download template: it is the exact definition of what to create. The setup prompt and the Open AWS setup link carry the values it needs.
- Create the same three resources, exactly as the downloaded template defines them: the same names, trust policies and permissions.
- Press I have the role ARN, paste the controller role’s ARN into the Controller role ARN
field and press Verify (or run
mutagent sandbox providers verify). Verify checks the role, never a stack, so it works however you created the resources. It does not compare your resources with the template: Verify fails at once on a role or repository with another name, or a trust policy that doesn’t tie the role to this connection. Any other difference shows up later, when Mutagent needs it.
What Mutagent can do in your account
- Apart from listing (below), Mutagent can only create, run and clean up this connection’s
sandboxes in the region you picked: the runtimes named
mtgc_<short-id>_…, the stack’s repository and the execution role it hands to AgentCore. It can’t change or use another connection’s runtimes. - Two listings reach beyond this connection, because AWS allows no narrower scope for listing: Mutagent can list the AgentCore runtimes in the region, and the sandboxes can list the log groups in the region. They see the names and basic details of those runtimes and log groups, but can’t read a runtime’s settings or the logs themselves.
- It uses no models in your account. Sandboxes call models with your workspace’s LLM providers, and model use in your account is denied outright.
- It holds no AWS keys. It only gets temporary access, each time it needs it, through the controller role, which you control: change or delete that role and its access ends.
Image delivery
There is nothing to choose or maintain. Mutagent copies its sandbox image into the stack’s repository when the connection is verified, and again whenever Mutagent releases a new sandbox image. Images are copied by digest, so your account runs exactly the image Mutagent tested. Layers already in your repository are skipped. A launch can’t start on an image that isn’t in your repository yet:- During the first copy, before the connection is Ready, a launch is refused with
SANDBOX_CONNECTION_NOT_READY. - When the connection is Ready but the image a launch asks for isn’t in your repository yet (for
example right after a new Mutagent release), the launch is refused with
SANDBOX_IMAGE_NOT_SYNCED.
syncing, and
mutagent sandbox providers lists its status as syncing (image copy failed), with the verify command
that retries the copy.
Platform V2 or V1
New connections run on AgentCore platform V2, and that is the right choice for most accounts. On V2, each session starts from a snapshot of a runtime that has already started, so sessions start faster. The first start of a runtime takes a few minutes while AgentCore builds the snapshot. Pick V1 only if your organization has not approved V2. It does not widen the regions you can connect: the region list is the same for both. The platform applies to runtimes created after you set it: sessions already running keep theirs. To switch an existing connection:Use the connection
Each connection is a sandbox provider namedaws-agentcore:<connection-id>. A new connection is not
the default: runs keep starting where they did until you choose it.
-
Make it the workspace default. When it is
ready, press the star in the top corner of its card: the filled star marks the workspace default. Press the star on Mutagent Cloud to move back. From the CLI:Factory runs and gateway runs of the workspace follow the workspace default too. -
Name it for one run with
--sandbox-provider aws-agentcore:<connection-id>. A run’s--sandbox-provideralways wins over the default, in both directions. See Sandbox providers.
Revoke access
Two ways, and you can use both: remove the connection in Mutagent, which ends its use and cleans up its runtimes, or cut off Mutagent’s access yourself in IAM. Remove the connection in Mutagent. Press Remove on its card and confirm (or runmutagent sandbox providers remove <connection-id> --yes). Launches on it stop at once and its
running sandboxes are stopped. Mutagent deletes the runtimes it created there; the connection stays
Removing until Mutagent has confirmed that cleanup, then it disappears. If AWS already refuses
Mutagent’s sign-in, for example after you cut access in IAM, there is nothing Mutagent can clean up:
the connection disappears without that confirmation, so check for runtimes yourself (step 2 below).
Removing changes nothing in IAM: your stack, and the controller role in it, stay until you delete
them.
To leave nothing behind, in this order:
- Remove the connection in Mutagent, while it still has access: that lets it stop sandboxes and delete its runtimes.
- Check that no runtime named
mtgc_<short-id>_…is left: in the AgentCore console, or withaws bedrock-agentcore-control list-agent-runtimes. Delete any that is. Once the stack is gone, Mutagent can no longer clean them up. - After removing the runtimes, delete any remaining
/aws/bedrock-agentcore/runtimes/mtgc_<short-id>_*log groups in CloudWatch Logs if you don’t need to retain their logs. - Delete the stack
mutagent-sandbox-<short-id>in CloudFormation. Deleting the stack also empties and deletes the repository. If the stack delete fails on the repository, delete the images in the ECR console and retry. If you created the resources with your own tooling, delete them there instead, emptying the repository first.
Cut access from your AWS console
The controller role is yours, so you can also close it yourself in IAM, without going through Mutagent. Stop new sign-ins first, then end the access Mutagent already has:-
Stop new sign-ins. In the IAM console, open
MutagentSandboxController-<short-id>, and under Trust relationships replace the trust policy with one that allows no one (or delete the role, or the whole stack, to cut access for good). IAM changes take effect after a short delay. Then check the cutoff with Verify, which signs in afresh: runmutagent sandbox providers verify '<connection-id>' --role-arn '<ControllerRoleArn>', or callPOST /api/sandbox/connections/<connection-id>/verifywith thecontrollerRoleArn. The cutoff holds when Verify fails because AWS refuses Mutagent’s sign-in to the role; the card then shows Check failed with AWS’s refusal. If Verify still passes, or fails for another reason, wait a little and check the trust policy again. The card’s Verify again button appears only once the connection shows Check failed or Access revoked, so a Ready connection is verified from the CLI or the API. - End the access it already has. Once Verify reports that AWS refuses the sign-in, use Revoke active sessions on the same role. AWS then denies every request made with a session issued before that moment.
ready: your Verify leaves it in error, and a request
of Mutagent’s own that AWS refuses marks it revoked. Every launch on it is refused with
SANDBOX_CONNECTION_NOT_READY and a fix. Nothing moves to another provider, before or after.
Runtimes still in your account stay there until you delete them. When you are ready, finish with
To leave nothing behind above; Mutagent can’t help with it any more, so check each
step yourself.
Troubleshooting
When Verify fails, the connection shows Check failed, and the card shows what failed and how to fix it. The usual causes:
Fix the cause, then press Continue setup on the card and Verify in the dialog, or run
verify
again. Verify again is on the card itself once the connection has passed a verify before. For a
connection that shows Check failed or Access revoked, Continue setup opens the dialog at the
Verify step; Back shows a fresh setup prompt and link, as does
mutagent sandbox providers setup '<connection-id>'. Use them if the fix needs a new stack and the
setup link has expired.
Other errors you may see: