From aws-dev-toolkit
Deep-dive into Amazon Bedrock AgentCore platform design, service selection, deployment, and production operations. This skill should be used when the user asks to "design an AgentCore architecture", "deploy agents on AgentCore", "configure AgentCore Runtime", "set up AgentCore Memory", "use AgentCore Gateway", "configure AgentCore Identity", "set up AgentCore Policy", "plan agent observability", "evaluate agent quality", "move agent PoC to production", or mentions AgentCore, AgentCore Runtime, AgentCore Memory, AgentCore Gateway, AgentCore Identity, AgentCore Policy, AgentCore Evaluations, AgentCore Code Interpreter, AgentCore Browser, A2A protocol, or multi-agent orchestration on AWS.
npx claudepluginhub aws-samples/sample-claude-code-plugins-for-startups --plugin aws-dev-toolkitThis skill uses the workspace's default tool permissions.
Specialist guidance for Amazon Bedrock AgentCore. Covers the full platform: Runtime, Memory, Gateway, Identity, Policy, Code Interpreter, Browser, Observability, and Evaluations. Framework-agnostic and model-agnostic.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Share bugs, ideas, or general feedback.
Specialist guidance for Amazon Bedrock AgentCore. Covers the full platform: Runtime, Memory, Gateway, Identity, Policy, Code Interpreter, Browser, Observability, and Evaluations. Framework-agnostic and model-agnostic.
aws-docs MCP tools to verify current AgentCore quotas, regional availability, and API changes| Requirement | Service | Why |
|---|---|---|
| Deploy and scale agents serverlessly | Runtime | Secure, framework-agnostic hosting with session isolation, auto-scaling, consumption-based pricing |
| Conversation history and learned context | Memory | Short-term (session) and long-term (episodic) memory without managing infrastructure |
| Expose APIs/Lambda as agent tools | Gateway | Converts existing APIs and Lambda functions into MCP-compatible tools, handles auth |
| Agent-to-third-party auth (OAuth, API keys) | Identity | Manages workload identities, OAuth2 token exchange, API key vaults |
| Control what agents can do with tools | Policy | Cedar-based deterministic enforcement at the Gateway boundary, natural language authoring |
| Execute code in sandbox | Code Interpreter | Isolated sandbox for Python execution, file I/O, data analysis |
| Browse web pages programmatically | Browser | Cloud-based browser runtime for web interaction at scale |
| Trace, debug, monitor agent behavior | Observability | OpenTelemetry-compatible traces to CloudWatch/X-Ray, unified dashboards |
| Test and score agent quality | Evaluations | 13 built-in evaluators, custom scoring, continuous monitoring |
AgentCore Runtime is a serverless, purpose-built hosting environment for AI agents.
Development and testing: Use the AgentCore CLI or Starter Toolkit for fast iteration — scaffolding, local dev, quick deploys, and testing.
Production: Define all AgentCore resources in IaC (CDK, Terraform, CloudFormation, or SAM). CLI-created resources are useful for prototyping but should not be the source of truth for production infrastructure. The Starter Toolkit's CDK templates are a solid starting point for production IaC.
agentcore init → agentcore deploy in minutesThe AgentCore CLI is the preferred tool for scaffolding, local development, and rapid iteration on agents. It abstracts away container builds, ECR pushes, and runtime configuration into simple commands. Use it for dev/test workflows — for production, define the same resources in IaC.
pip install agentcore-cli
# Initialize a new agent project (choose framework: strands, langgraph, or custom)
agentcore init my-agent --framework strands
# Develop locally
cd my-agent
agentcore dev
# Deploy to AgentCore Runtime
agentcore deploy --region us-east-1
# Test the deployed agent
agentcore invoke --agent-name my-agent --input "Hello, what can you do?"
agentcore dev runs the agent locally with hot-reload| Task | AgentCore CLI | AWS CLI |
|---|---|---|
| Create new agent | agentcore init | Manual Dockerfile + ECR + create-agent-runtime |
| Deploy | agentcore deploy | docker build + docker push + create/update API calls |
| Local dev | agentcore dev | Manual server setup |
| Test | agentcore invoke | aws bedrock-agentcore invoke-agent-runtime |
Use the AgentCore CLI for day-to-day development and testing. For production, define the equivalent resources in CDK, Terraform, or CloudFormation — the CLI is great for proving out configurations quickly, but IaC is the source of truth for production infrastructure.
The AgentCore Starter Toolkit provides a full-stack CDK reference architecture. Use it when you need a complete production deployment with authentication, frontend, and all AgentCore services wired together.
cdk deploygit clone https://github.com/aws/bedrock-agentcore-starter-toolkit.git
cd bedrock-agentcore-starter-toolkit
pip install -r requirements.txt
cdk deploy --all
The Fullstack AgentCore Solution Template (FAST) deploys:
CloudFront (React frontend)
→ Cognito (auth)
→ AgentCore Runtime (agent hosting)
→ AgentCore Memory (conversation + episodic)
→ AgentCore Gateway (MCP-compatible tools)
→ AgentCore Code Interpreter (Python sandbox)
→ AgentCore Observability → CloudWatch + X-Ray
Four authentication integration points are handled automatically:
| Phase | Use | Why |
|---|---|---|
| Scaffolding + local dev | AgentCore CLI | init → dev in minutes, hot-reload |
| Quick PoC deployment | AgentCore CLI | deploy handles container build, ECR, runtime creation |
| Full-stack reference architecture | Starter Toolkit | CDK deploys Runtime + Gateway + Memory + Cognito + CloudFront |
| Production resource definition | CDK / Terraform / SAM | IaC is the source of truth — reproducible, reviewable, auditable |
| Add agent to existing IaC | CDK construct or Terraform resource | Integrate into your existing infrastructure code |
| Learn AgentCore end-to-end | Starter Toolkit | Extensively documented, AI-dev friendly, fork as your production IaC starting point |
| Setting | Recommendation | Notes |
|---|---|---|
| CPU/Memory | Start with 1 vCPU / 2 GiB | Scale based on model inference needs and tool call overhead |
| Session TTL | 600s for real-time, up to 28,800s for async | Idle sessions consume resources |
| VPC connectivity | Enable for agents accessing private resources | Uses ENIs in your VPC |
| Endpoint type | Use agent endpoints for routing | Supports alias-based traffic splitting |
docker push)cdk deploy / terraform apply / CloudFormation changesetagentcore invoke for smoke testing deployed agentsConverts existing APIs, Lambda functions, and services into MCP-compatible tools that any agent framework can consume.
Gateway intercepts all agent-to-tool traffic. Policy evaluates Cedar rules against each request before allowing or denying. This separation means:
Manages how agents authenticate to third-party services and AWS resources.
Deterministic control over agent-tool interactions using Cedar language.
| Pattern | Cedar Example | Use Case |
|---|---|---|
| Amount limits | forbid when { resource.refundAmount > 1000 } | Financial guardrails |
| User-scoped access | permit when { principal.department == "engineering" } | Role-based tool access |
| Tool restriction | forbid action == Action::"invoke" when { resource.toolName == "deleteUser" } | Prevent dangerous operations |
| Time-based | permit when { context.hour >= 9 && context.hour <= 17 } | Business-hours-only actions |
| Factor | Multi-Agent Collaboration | A2A Protocol | Agents-as-Tools |
|---|---|---|---|
| Framework flexibility | Bedrock Agents only | Any framework | Any framework (same runtime) |
| Cross-account | No | Yes | No |
| Managed orchestration | Yes | No (custom) | Partial |
| Setup complexity | Low | Medium-High | Low |
| Best for | All-in on Bedrock Agents | Cross-team, heterogeneous | Single-team, single runtime |
AgentCore uses consumption-based pricing across all services — no upfront commitments.
| Service | Billing Unit | Key Detail |
|---|---|---|
| Runtime | CPU-seconds + memory-seconds | 1-second minimum, active consumption only |
| Memory | Storage + retrieval operations | Short-term included with Runtime sessions |
| Gateway | API calls + search queries + tool indexing | Per-request pricing |
| Identity | Token/key requests for non-AWS resources | Per-request pricing |
| Policy | Authorization requests + NL authoring tokens | Per-request pricing |
| Code Interpreter | CPU-seconds + memory-seconds | Per-session, 1-second minimum |
| Browser | CPU-seconds + memory-seconds | Per-session, 1-second minimum |
| Observability | Telemetry generated + stored + queried | Similar to CloudWatch pricing model |
| Evaluations | Built-in evaluator invocations + custom evals | Per-evaluation pricing |
AgentCore services are available across multiple regions. Core services (Runtime, Memory, Gateway, Identity) are available in: us-east-1, us-east-2, us-west-2, ap-southeast-1, ap-southeast-2, ap-south-1, ap-northeast-1, eu-west-1, eu-central-1. Check the aws-docs MCP tools for the latest regional availability, as new regions are added regularly.
For detailed operational guidance, consult:
references/runtime-deployment.md — Container setup, SDK decorators, CI/CD with GitHub Actions, alias management, VPC configuration, scaling patterns, and Starter Toolkit usagereferences/memory-gateway-identity.md — Memory configuration (short-term and long-term), Gateway setup with Lambda/API targets, Identity OAuth2/API key patterns, and Policy Cedar examplesreferences/observability-evaluations.md — OpenTelemetry instrumentation, CloudWatch/X-Ray integration, Langfuse for LLM-specific analytics, DeepEval evaluation patterns, CI/CD eval integration, and production monitoring dashboardsbedrock — Bedrock cost modeling and model selection for agent workloadsstrands-agent — Strands Agents SDK scaffolding (deploys to AgentCore Runtime)security-review — IAM, network, and encryption audit for agent infrastructurenetworking — VPC design for agents accessing private resourcesobservability — CloudWatch/X-Ray deep-dive for agent monitoringstep-functions — Alternative orchestration for deterministic multi-step workflowsWhen recommending an AgentCore architecture, include:
| Component | Choice | Rationale |
|---|---|---|
| Runtime | Container on ECR, 1 vCPU / 2 GiB | Standard agent workload |
| Framework | Strands Agents | Python-native, AWS-integrated |
| Model | Claude Sonnet via Bedrock | Capable reasoning, tool calling |
| Memory | Short-term + long-term (episodic) | Customer support needs continuity |
| Gateway | 3 Lambda targets (orders, refunds, FAQ KB) | Existing APIs wrapped as MCP tools |
| Identity | OAuth2 for Salesforce, IAM for DynamoDB | Third-party + AWS resource access |
| Policy | Cedar: refund amount limits, role-based tool access | Financial compliance |
| Observability | AgentCore native + Langfuse | Infra health + LLM behavior analytics |
| Evaluations | 5 built-in evaluators + custom tool-use eval | CI/CD quality gate |
Include estimated monthly cost range using the cost-check skill or the awspricing MCP tools.