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
- 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", "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:
- 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?"
- 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 intent |
Reference to load |
| Add memory, remember things, user preferences, cross-session |
references/memory.md |
| Call agent from app, invoke from code, streaming, SDK client, agent URL, execute shell in session |
references/integrate.md |
| VPC, private network, RDS, internal API, subnet, security group |
references/vpc.md |
| Multi-agent, orchestrator, specialist, A2A, delegation, agent handoff |
references/multi-agent.md |
| Custom headers from caller to agent, header allowlist, tenant ID/correlation ID/trace propagation |
references/request-headers.md |
| Migrate Bedrock Agent, import agent, move to AgentCore |
references/migrate.md |
| Browser tool, web navigation, form filling, scraping, Nova Act, Playwright, live view |
references/browser.md |
| Code Interpreter, execute code, sandbox, run Python/JS/TS, data analysis in agent, pandas |
references/code-interpreter.md |
| Delete agent, remove resource, tear down, clean up, destroy, start fresh |
references/teardown.md |
| Change model, switch model, use Haiku/Sonnet/Nova, different model |
Inline — 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:
- Open
app/<AgentName>/model/load.py
- 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:
| Resource |
Max chars |
Allowed |
Starts with |
Agent (add agent) |
48 |
alphanumeric + _ |
letter |
| Memory, gateway, gateway-target, credential, evaluator, online-eval, policy, policy-engine |
48 |
alphanumeric + _ |
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
1---2name: agents-build3description: >4 Use when adding capabilities to an existing agent project — memory,5 app integration, VPC, multi-agent, migration, model changes, browser,6 code interpreter, or resource removal. Triggers on: "add memory",7 "remember across sessions", "call agent from app", "invoke agent from8 code", "auth to call agent", "streaming responses", "VPC", "VPC9 connectivity", "VPC error", "can't reach from VPC", "multi-agent",10 "A2A", "A2A auth", "orchestrator not delegating", "specialist not11 called", "migrate Bedrock Agent", "after import", "migration issue",12 "framework for migration", "change model", "browser tool", "code13 interpreter", "delete agent", "tear down", "agentcore remove",14 "cross-account memory", "resource-based policy on memory".15 Not for connecting to external APIs via Gateway — use agents-connect.16 Not for scaffolding a new project — use agents-get-started.17 Not for CLI/dev server errors — use agents-debug.18 Strands vs LangGraph in a migration context routes here.19allowed-tools: Read Grep Glob Bash20metadata:21 source: https://skillmd.com/skills/aibot88/agents-build22 type: skill23 version: "1.0.0"24 author: aws-agentcore25 requires-cli: ">=0.9.0"26---2728# build2930Add capabilities to your AgentCore agent project.3132## When to use3334- Adding cross-session memory to your agent35- Calling your deployed agent from a web app, mobile app, or backend service36- Configuring VPC networking for private resources (RDS, internal APIs)37- Building multi-agent systems with orchestrator/specialist patterns38- Migrating an existing Bedrock Agent to AgentCore39- Adding the Browser tool so the agent can navigate websites40- Adding the Code Interpreter so the agent can execute code in a sandbox41- Removing resources from your project or tearing down a deployment4243Do NOT use for:4445- Connecting to external tools/APIs via Gateway (OpenAPI specs, Lambda, MCP servers, credentials, policies) → use `agents-connect`46- Scaffolding a new project → use `agents-get-started`47- Deploying → use `agents-deploy`4849## Input5051`$ARGUMENTS` can be:5253- A capability: "memory", "integrate", "vpc", "multi-agent", "migrate", "browser", "code-interpreter", "teardown"54- 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"55- Empty — the skill will determine the workflow from context5657## Process5859### Step 0: Verify CLI version6061Run `agentcore --version`. This skill requires v0.9.0 or later.6263If older: "Run `agentcore update` to get the latest version."6465### Step 1: Read project context6667Read `agentcore/agentcore.json` to understand the current project — framework, existing resources, agent configuration.6869If `agentcore/agentcore.json` is not found:70711. **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?"722. **If no project exists anywhere nearby**, ask what capability they wanted to add. Then offer two paths:73 - "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)74 - "If you already have a project elsewhere, `cd` into it and try again."7576Do not just say "go use agents-get-started" and stop — that loses the developer's context about what they actually wanted to do.7778### Step 2: Determine the workflow7980**Important disambiguation** — before routing to a build reference, check if the prompt is actually a connect or debug concern:8182- If the phrase mentions external APIs, Lambda functions, OpenAPI specs, gateways, credentials, MCP servers, or policies → this is `agents-connect`, not build83- If the developer says something is broken (wrong answers, errors, tool failures) → this is `agents-debug`, not build84- Build is for **adding new capabilities** to a working project, not fixing broken ones8586Based on the developer's prompt and `$ARGUMENTS`, load the appropriate reference:8788| Developer intent | Reference to load |89|---|---|90| Add memory, remember things, user preferences, cross-session | [`references/memory.md`](references/memory.md) |91| Call agent from app, invoke from code, streaming, SDK client, agent URL, execute shell in session | [`references/integrate.md`](references/integrate.md) |92| VPC, private network, RDS, internal API, subnet, security group | [`references/vpc.md`](references/vpc.md) |93| Multi-agent, orchestrator, specialist, A2A, delegation, agent handoff | [`references/multi-agent.md`](references/multi-agent.md) |94| Custom headers from caller to agent, header allowlist, tenant ID/correlation ID/trace propagation | [`references/request-headers.md`](references/request-headers.md) |95| Migrate Bedrock Agent, import agent, move to AgentCore | [`references/migrate.md`](references/migrate.md) |96| Browser tool, web navigation, form filling, scraping, Nova Act, Playwright, live view | [`references/browser.md`](references/browser.md) |97| Code Interpreter, execute code, sandbox, run Python/JS/TS, data analysis in agent, pandas | [`references/code-interpreter.md`](references/code-interpreter.md) |98| Delete agent, remove resource, tear down, clean up, destroy, start fresh | [`references/teardown.md`](references/teardown.md) |99| Change model, switch model, use Haiku/Sonnet/Nova, different model | Inline — see "Changing the model" below |100101If 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`](references/local-vs-deployed.md) alongside the specific workflow reference.102103Read the matching file into context and follow its Process section step by step — do not summarize.104105If the intent is ambiguous, ask the developer which capability they want to add.106107### Changing the model108109The model is configured in `app/<AgentName>/model/load.py` (scaffolded by `agentcore create`). To change it:1101111. Open `app/<AgentName>/model/load.py`1122. Change the `model_id` parameter in the `BedrockModel()` constructor113114```python115# Default (scaffolded by CLI)116return BedrockModel(model_id="global.anthropic.claude-sonnet-4-5-20250929-v1:0")117118# Switch to Haiku for cost savings119return BedrockModel(model_id="us.anthropic.claude-3-5-haiku-20241022-v1:0")120121# Switch to Nova Lite122return BedrockModel(model_id="amazon.nova-lite-v1:0")123```124125Cross-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.126127After changing the model:128129- Verify the model is enabled in your region: AWS Console → Amazon Bedrock → Model access130- For cross-region profiles, enable in all destination regions131- If using `agents-harden`, update the IAM policy to scope to the new model ARN132- Run `agentcore dev` to test locally, then `agentcore deploy` to update the deployed agent133134No `agentcore.json` change is needed — the model is configured in code, not in the project config.135136### Pre-flight: validate any `--name` before generating the CLI command137138Whichever 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:139140| Resource | Max chars | Allowed | Starts with |141|---|---|---|---|142| Agent (`add agent`) | 48 | alphanumeric + `_` | letter |143| Memory, gateway, gateway-target, credential, evaluator, online-eval, policy, policy-engine | 48 | alphanumeric + `_` | letter |144145Count 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.146147Note: `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.148149## Output150151Depends on the workflow — see the loaded reference for specific outputs.152153## Quality criteria154155- The correct reference was loaded based on the developer's intent156- All output follows the loaded reference's quality criteria157- Cross-references to other skills (agents-connect, agents-deploy) are included where relevant