Generated banner for Agents Build
Generated logo for Agents Build

Agents Build

AWSOfficialCreated by aws-agentcore

  • Skill
  • Workflow
  • Cloud and DevOps
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

Use to extend an existing agent project with memory, app integration, VPC, multi-agent, migration, model, browser, code interpreter, payments, or resource removal. Triggers: "add memory", "remember across sessions", "call agent from app", "invoke agent from code", "agent auth", "streaming", "VPC", "VPC connectivity", "can't reach from VPC", "multi-agent", "A2A", "A2A auth", "orchestrator not delegating", "specialist not called", "migrate Bedrock Agent", "migration issue", "change model", "browser tool", "code interpreter", "delete agent", "tear down", "agentcore remove", "cross-account memory", "add payments capability to my agent", "wire payments plugin", "integrate x402 payments with the agent I'm building", "add MPP payments", "Machine Payments Protocol". External APIs via Gateway: use agents-connect. New project: use agents-get-started. CLI/dev-server errors: use agents-debug. Runtime x402/MPP payments: use agents-pay. Migration-specific Strands vs LangGraph routes here.
— the description by aws-agentcore

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The agents-build skill provides a structured workflow for adding advanced features to existing AgentCore projects. It acts as a central hub for configuring infrastructure and functional capabilities, such as cross-session memory, VPC connectivity, multi-agent delegation, and sandboxed code execution. The skill ensures project integrity by verifying the environment, checking for existing project configurations, and guiding the user through the appropriate implementation path based on their specific requirements.

What it does

  • Adds cross-session memory to maintain user context.
  • Configures VPC networking for secure access to private resources.
  • Enables multi-agent systems with orchestrator-specialist patterns.
  • Integrates browser and code interpreter tools for enhanced agent capabilities.
  • Facilitates the migration of existing Bedrock Agents to AgentCore.
  • Handles resource removal and project teardown.

When to use it

  • When you need to expand an existing agent's functionality.
  • When setting up private network connectivity for your agent.
  • When transitioning from a single-agent to a multi-agent architecture.
  • When you need to add sandboxed code execution or web browsing capabilities.
  • When you need to clean up or remove specific agent resources.

Advantages

  • Provides a consistent, guided workflow for complex configuration tasks.
  • Prevents common errors by validating project context and naming conventions.
  • Reduces manual setup time for infrastructure-heavy features like VPCs.
  • Centralizes documentation and implementation steps for diverse agent capabilities.

Usage examples

“add memory to my agent”
The skill reads the project configuration and provides the necessary steps to implement cross-session memory storage.
“I need to add a code interpreter to my agent”
The skill guides you through the integration of the AgentCore Code Interpreter tool for sandboxed Python or JS execution.
“how do I set up VPC connectivity?”
The skill loads the VPC reference documentation and walks you through configuring subnets and security groups for your agent.
“tear down my agent”
The skill initiates the resource removal workflow to safely destroy the specified agent deployment.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/aws/agents-build/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip agents-build.zip -d .agents/skills

Documentation by aws-agentcore

build

Add capabilities to your AgentCore agent project.

When to use

  • Adding cross-session memory to your agent

  • Calling your deployed agent from a web app, mobile app, or backend service

  • Configuring VPC networking for private resources (RDS, internal APIs)

  • Building multi-agent systems with orchestrator/specialist patterns

  • Migrating an existing Bedrock Agent to AgentCore

  • Adding the Browser tool so the agent can navigate websites

  • Adding the Code Interpreter so the agent can execute code in a sandbox

  • Adding AgentCore Payments so the agent can pay for x402- or MPP-protected APIs, tools, or content

  • Removing resources from your project or tearing down a deployment

Do NOT use for:

  • Connecting to external tools/APIs via Gateway (OpenAPI specs, Lambda, MCP servers, credentials, policies) → use agents-connect

  • Scaffolding a new project → use agents-get-started

  • Deploying → use agents-deploy

Input

$ARGUMENTS can be:

  • A capability: "memory", "integrate", "vpc", "multi-agent", "migrate", "browser", "code-interpreter", "payments", "teardown"

  • A description of what they want: "remember user preferences", "call from React app", "scrape a website", "run pandas in the agent", "delete my agent", "clean up resources"

  • Empty — the skill will determine the workflow from context

Process

Step 0: Verify CLI version

Run agentcore --version. This skill requires v0.9.0 or later.

If older: "Run agentcore update to get the latest version."

Step 1: Read project context

Read agentcore/agentcore.json to understand the current project — framework, existing resources, agent configuration.

If agentcore/agentcore.json is not found:

  1. Check if the developer is in the wrong directory. Look for agentcore/agentcore.json in parent directories (up to 3 levels). If found, tell them: "Found an AgentCore project at <path>. Are you working in that project?"

  2. If no project exists anywhere nearby, ask what capability they wanted to add. Then offer two paths:

    • "I can walk you through creating a project first and then adding CAPABILITY — want to do that?" (run the get-started flow inline, then continue with the build workflow)

    • "If you already have a project elsewhere, cd into it and try again."

Do not just say "go use agents-get-started" and stop — that loses the developer's context about what they actually wanted to do.

Step 2: Determine the workflow

Important disambiguation — before routing to a build reference, check if the prompt is actually a connect or debug concern:

  • If the phrase mentions external APIs, Lambda functions, OpenAPI specs, gateways, credentials, MCP servers, or policies → this is agents-connect, not build

  • If the developer says something is broken (wrong answers, errors, tool failures) → this is agents-debug, not build

  • Build is for adding new capabilities to a working project, not fixing broken ones

Based on the developer's prompt and $ARGUMENTS, load the appropriate reference:

Developer intentReference to load
Add memory, remember things, user preferences, cross-sessionreferences/memory.md
Call agent from app, invoke from code, streaming, SDK client, agent URL, execute shell in sessionreferences/integrate.md
VPC, private network, RDS, internal API, subnet, security groupreferences/vpc.md
Multi-agent, orchestrator, specialist, A2A, delegation, agent handoffreferences/multi-agent.md
Custom headers from caller to agent, header allowlist, tenant ID/correlation ID/trace propagationreferences/request-headers.md
Migrate Bedrock Agent, import agent, move to AgentCorereferences/migrate.md
Browser tool, web navigation, form filling, scraping, Nova Act, Playwright, live viewreferences/browser.md
Code Interpreter, execute code, sandbox, run Python/JS/TS, data analysis in agent, pandasreferences/code-interpreter.md
Payments, pay for x402 or MPP content, 402 Payment Required, Machine Payments Protocol, WWW-Authenticate: Payment, microtransactions, paid API/tool, payment manager/connectorreferences/payments.md
Delete agent, remove resource, tear down, clean up, destroy, start freshreferences/teardown.md
Change model, switch model, use Haiku/Sonnet/Nova, different modelInline — see "Changing the model" below

If the developer asks about the difference between local dev and deployed (e.g., "why does my memory work after deploy but not locally?"), load references/local-vs-deployed.md alongside the specific workflow reference.

Read the matching file into context and follow its Process section step by step — do not summarize.

If the intent is ambiguous, ask the developer which capability they want to add.

Changing the model

The model is configured in app/<AgentName>/model/load.py (scaffolded by agentcore create). To change it:

  1. Open app/<AgentName>/model/load.py

  2. Change the model_id parameter in the BedrockModel() constructor

# Default (scaffolded by CLI)
return BedrockModel(model_id="global.anthropic.claude-sonnet-4-5-20250929-v1:0")

# Switch to Haiku for cost savings
return BedrockModel(model_id="us.anthropic.claude-3-5-haiku-20241022-v1:0")

# Switch to Nova Lite
return BedrockModel(model_id="amazon.nova-lite-v1:0")

Cross-region inference profile prefixes (us., eu., apac., global.) control where inference runs. Use global. for maximum throughput, or a geographic prefix for data residency. Not all models support all prefixes — check the Bedrock inference profiles docs.

After changing the model:

  • Verify the model is enabled in your region: AWS Console → Amazon Bedrock → Model access

  • For cross-region profiles, enable in all destination regions

  • If using agents-harden, update the IAM policy to scope to the new model ARN

  • Run agentcore dev to test locally, then agentcore deploy to update the deployed agent

No agentcore.json change is needed — the model is configured in code, not in the project config.

Pre-flight: validate any --name before generating the CLI command

Whichever reference you load, most end up producing an agentcore add <resource> --name <something> command. The CLI fails late on invalid names — you'll see the error after walking through prompts, not before running the command. Validate up front:

ResourceMax charsAllowedStarts with
Agent (add agent)48alphanumeric + _letter
Memory, gateway, gateway-target, credential, evaluator, online-eval, policy, policy-engine, payment-manager, payment-connector48alphanumeric + _letter

Count the characters before constructing the command. If the name is over the limit or contains hyphens, dots, or spaces, push back: "<name> is N characters / uses -, which the CLI rejects. How about <suggestion>?" Never run the command with an invalid name hoping the CLI message will be clear.

Note: agentcore create --name (the project name) has a stricter 23-char limit and does not allow underscores. That's covered in agents-get-started; if you see the developer re-running create, flag the 23-char limit specifically.

Output

Depends on the workflow — see the loaded reference for specific outputs.

Quality criteria

  • The correct reference was loaded based on the developer's intent

  • All output follows the loaded reference's quality criteria

  • Cross-references to other skills (agents-connect, agents-deploy) are included where relevant

Files

references/browser.md

browser

Add the AgentCore Browser tool so your agent can navigate web pages, fill forms, and extract information.

When to use

  • Your agent needs to interact with a website that has no API

  • Your agent needs to fill forms, scrape data, or drive a web app

  • You want an isolated, session-scoped browser for the agent (not a shared one)

  • You want live-view / recording / replay of what the browser did, for debugging or auditing

Do NOT use this reference for:

  • Calling an API — use Gateway (agents-connect)

  • Running code in a sandbox — see code-interpreter.md

  • Serving browser-based UIs to users — that's a different problem (the AGUI protocol, not the Browser tool)

Mental model

The Browser tool is a managed Chrome instance, one per session, running in an isolated microVM. Your agent connects to it over WebSocket (via CDP — Chrome DevTools Protocol) and drives it with an automation framework. You pick the framework:

FrameworkWhen to use
Strands AgentCoreBrowserAgent-driven browsing inside a Strands agent. Highest-level, tool-use-native.
Nova ActYou want an LLM to decide the next action at each step ("click the search box, type X, press enter"). Best for open-ended tasks.
PlaywrightDeterministic scripted automation. Best when you know the exact steps — login flows, scraping a known page structure.

If you're adding browsing to a Strands agent, use AgentCoreBrowser and skip the framework decision — it wraps Nova Act under the hood and fits the agent-tool mental model.

If you're not using Strands, pick between Nova Act (reasoning-driven) and Playwright (script-driven) based on whether the task is open-ended or well-defined.

Sessions are ephemeral by default (reset after each use). Default timeout is 15 minutes, max 8 hours. You can run multiple concurrent sessions.

Prerequisites

  • Python 3.10+

  • bedrock-agentcore SDK installed

  • IAM permissions for bedrock-agentcore:*Browser* actions (scope to your browser resource ARN in production)

  • AWS region that supports Browser — check the docs for the current list

  • For Strands path: model access for your chosen model (Claude Sonnet 4.x is the common default)

  • For Nova Act path: a Nova Act API key from nova.amazon.com/act (US-based amazon.com accounts only at time of writing)

IAM policy skeleton (attach to the caller identity — your user, role, or AgentCore Runtime execution role):

{
  "Version": "2012-10-17",
  "Statement": [{
    "Sid": "BrowserAccess",
    "Effect": "Allow",
    "Action": [
      "bedrock-agentcore:CreateBrowser",
      "bedrock-agentcore:GetBrowser",
      "bedrock-agentcore:ListBrowsers",
      "bedrock-agentcore:StartBrowserSession",
      "bedrock-agentcore:StopBrowserSession",
      "bedrock-agentcore:GetBrowserSession",
      "bedrock-agentcore:ListBrowserSessions",
      "bedrock-agentcore:ConnectBrowserAutomationStream",
      "bedrock-agentcore:ConnectBrowserLiveViewStream"
    ],
    "Resource": "arn:aws:bedrock-agentcore:<REGION>:<ACCOUNT_ID>:browser/*"
  }]
}

Check current IAM action names against the docs — the list evolves.

from strands import Agent
from strands_tools.browser import AgentCoreBrowser

browser_tool = AgentCoreBrowser(region="<REGION>")

agent = Agent(tools=[browser_tool.browser])

result = agent("Find the release date of the latest AgentCore SDK on GitHub.")
print(result.message["content"][0]["text"])

Install: pip install bedrock-agentcore strands-agents strands-agents-tools

The agent decides when to use the browser, opens sessions on demand, and cleans them up. Under the hood, AgentCoreBrowser uses the AWS-managed aws.browser.v1 resource — no resource creation needed.

Dropping into an AgentCore Runtime entrypoint:

from bedrock_agentcore.runtime import BedrockAgentCoreApp
from strands import Agent
from strands_tools.browser import AgentCoreBrowser
from model.load import load_model  # scaffolded by `agentcore create`
import os

app = BedrockAgentCoreApp()
REGION = os.getenv("AWS_REGION", "us-west-2")

@app.entrypoint
def invoke(payload, context):
    browser_tool = AgentCoreBrowser(region=REGION)
    agent = Agent(model=load_model(), tools=[browser_tool.browser])
    result = agent(payload.get("prompt", ""))
    return {"response": str(result)}

if __name__ == "__main__":
    app.run()

Path B — Nova Act for reasoning-driven tasks

Use when the task needs an LLM to decide each click/type step.

from bedrock_agentcore.tools.browser_client import browser_session
from nova_act import NovaAct

def run_browser_task(prompt: str, starting_page: str, nova_act_key: str, region: str = "us-west-2"):
    with browser_session(region) as client:
        ws_url, headers = client.generate_ws_headers()
        with NovaAct(
            cdp_endpoint_url=ws_url,
            cdp_headers=headers,
            nova_act_api_key=nova_act_key,
            starting_page=starting_page,
        ) as nova:
            return nova.act(prompt)

Install: pip install bedrock-agentcore nova-act boto3

The browser_session context manager handles start/stop. Do not leak sessions — always use the context manager or wrap raw BrowserClient calls in try/finally.

Credential handling: the Nova Act API key is a secret. If this is running inside an AgentCore Runtime agent, register it as a credential (agentcore add credential --name NovaAct --api-key ...) and retrieve it with @requires_api_key(provider_name="NovaAct"). Do not put it in runtime env vars. See agents-connect Path D.

Path C — Playwright for scripted automation

Use when the steps are fixed and you want deterministic behavior (logins, scrapes, automated tests).

import asyncio
from bedrock_agentcore.tools.browser_client import browser_session
from playwright.async_api import async_playwright

async def scrape_title(url: str, region: str = "us-west-2") -> str:
    async with async_playwright() as pw:
        with browser_session(region) as client:
            ws_url, headers = client.generate_ws_headers()
            browser = await pw.chromium.connect_over_cdp(ws_url, headers=headers)
            context = browser.contexts[0]
            page = context.pages[0]
            try:
                await page.goto(url)
                return await page.title()
            finally:
                await page.close()
                await browser.close()

print(asyncio.run(scrape_title("https://example.com")))

Install: pip install bedrock-agentcore playwright

Sync variant (sync_playwright) is also supported — pick based on whether your agent code is async.

Observability

Browser is observable by default:

  • Live view — watch a running session in real time from the AWS console (Built-in tools → Browser → your session → "View live session"). You can take over control from the automation interactively.

  • CloudWatch logs — /aws/bedrock-agentcore/browser/*

  • Metrics — in AWS/BedrockAgentCore namespace

Session recording (DOM, clicks, console logs, network) is opt-in per browser. To enable:

  1. Create a custom browser (not aws.browser.v1) with recording configured

  2. Give its execution role s3:PutObject on your recording bucket

  3. Recordings land in your S3 bucket and replay in the AWS console

The managed aws.browser.v1 resource does not record. Use custom browsers when you need audit trails.

Session lifecycle — always close

# Right — context manager
with browser_session(region) as client:
    ws_url, headers = client.generate_ws_headers()
    ...

# Also right — explicit try/finally
client = BrowserClient(region=region)
client.start()
try:
    ...
finally:
    client.stop()

# Wrong — leaked session
client = BrowserClient(region=region)
client.start()
...  # if this raises, the session sits idle until its 15-minute timeout

Sessions hold a microVM. Leaked sessions cost money until they time out. The context manager is non-negotiable for production.

VPC mode

If your agent runs in VPC mode, the Browser tool can also run in VPC. See vpc.md for the subnet + security group pattern (the same service-linked role covers Browser ENIs). Browser in VPC requires a NAT gateway for public-internet sites — public subnets don't give Browser internet access.

Common failures

"Access denied" starting a session: IAM is missing StartBrowserSession on the browser resource ARN. Check aws sts get-caller-identity matches the identity you attached the policy to.

"Model access denied" from a Strands agent: The browser tool itself is fine, but the agent's model isn't enabled. Go to Bedrock console → Model access → enable your model in the region.

Nova Act errors about API key: The key is US-amazon.com-accounts only at launch. If you're outside the US or using a work account, you can't use Nova Act yet — fall back to Playwright or Strands.

Browser session times out mid-task: Default is 15 minutes of idle time. Pass sessionTimeoutSeconds to StartBrowserSession (max 28800 = 8 hours). Don't use this to cover up agents that are slow — fix the agent or chunk the work.

Live view doesn't show your session: Live view requires ConnectBrowserLiveViewStream IAM permission. The session also has to be Ready, not Starting or Stopping.

Output

  • Which framework fits (Strands vs Nova Act vs Playwright)

  • Working code with session lifecycle handled

  • IAM policy scoped to the browser resource

  • Observability setup if needed (live view, recording)

Quality criteria

  • Browser sessions are always wrapped in a context manager or try/finally — never leaked

  • IAM is scoped to browser/* in the account, not Resource: "*"

  • Nova Act API keys and other secrets use agentcore add credential + @requires_api_key, not env vars

  • The code handles the case where the agent runs outside AgentCore Runtime (no .env.local, no credential provider) — typically by reading a local secret for development and the credential provider for production

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Declares allowed tools, Needs an MCP server, Needs Python

Security

What our scanner noticed· Low risk

  • Instructions that use the network
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
aws-agentcore
Publisher
AWS (Official)
Source
aws/agent-toolkit-for-aws · plugins/aws-agents/skills/agents-build · commit 0a218f8
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • NOTICE (added by AutoGineer from NOTICE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by aws-agentcore or AWS.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download agents-build.zip