Blog
ai

Real-World Architectures on Amazon Bedrock AgentCore

2026-07-09

Amazon Bedrock AgentCore is a modular, serverless platform for deploying and operating AI agents at scale on Amazon Web Services (AWS). It launched in preview on July 16, 2025, reached General Availability (GA) on October 13, 2025, and has since evolved at an extraordinary pace — roughly 40 significant feature releases in its first 12 months — into a 13-service platform.

That velocity is the first thing any builder needs to internalize: a source three months old can describe a fundamentally different platform than the one that exists today. The second thing is subtler, and it’s the single most important finding of this report: AgentCore is infrastructure, not a framework. Comparing it to LangGraph or CrewAI is a category error. It’s the deployment, identity, memory, observability, and tool-gateway layer that wraps those frameworks’ code.

This report synthesizes ten parallel research perspectives — architecture, practitioner experience, open-source survey, human-in-the-loop, framework comparison, DevOps, skeptic, security, cost, and platform evolution — to answer one practical question: what do real-world AgentCore implementations actually look like, and what patterns emerge from the code practitioners are writing?

The short answer: a platform that is architecturally distinctive but operationally immature. Its defining property is composability — it is framework-agnostic (Strands, LangGraph, CrewAI, Google’s Agent Development Kit (ADK), the OpenAI Agents SDK, and custom code all work) and model-agnostic (any Large Language Model (LLM), not just those hosted in Amazon Bedrock). But it ships real gaps in human-in-the-loop control, a genuinely unresolved security surface, and cost defaults that can quietly bankrupt a naive deployment.

The 13 composable services of Amazon Bedrock AgentCore, grouped into six categories

Figure 1 — AgentCore is a portfolio of 13 modular services, each with independent APIs, that can be used together or à la carte.


The Architecture: How AgentCore Works Under the Hood

A composable platform, not a monolith

AgentCore isn’t one service — it’s thirteen: Runtime, Harness, Memory, Gateway, Identity, Code Interpreter, Browser, Observability, Payments, Evaluations, Optimization, Policy, and Registry. The architectural philosophy is “bring your own framework and model.” Every service exposes independent APIs and integrates through protocol contracts rather than being a single monolithic agent runtime. You can adopt Memory without Runtime, or Gateway without either.

microVM-per-session compute

Each user session in AgentCore Runtime gets a dedicated Firecracker microVM — a lightweight virtual machine — with isolated CPU, memory, and filesystem. This is VM-level isolation, not container-level: after a session ends, the entire microVM is terminated and its memory sanitized, eliminating cross-session data contamination. A microVM persists for up to 8 hours of total runtime with a default idle timeout of 15 minutes (remember that number — it comes back in the cost section as the most expensive default in the platform).

Harness vs. Runtime: two deployment models

The most important architectural distinction is who writes the orchestration loop:

Harness versus Runtime — configuration versus code

Figure 2 — Runtime hosts your loop; Harness provides one. The Harness runs inside Runtime.

Nearly every feature follows this pattern: Harness = configuration, Runtime = you write code. The exceptions are telling — Harness does not support framework choice, bidirectional streaming, non-agent-loop patterns (graph/workflow), or lifecycle hooks. Those are Runtime-only.

Four protocol contracts

Runtime speaks four protocols, each with its own port and message format:

ProtocolPortFormatUse case
HTTP8080JSON / Server-Sent Events (SSE)General-purpose agents
Model Context Protocol (MCP)8000JSON-RPCTool servers, sub-agents
Agent2Agent (A2A)9000JSON-RPC 2.0 + Agent CardsAgent-to-agent communication
AG-UI8080SSE + WebSocketFrontend integration

All support both AWS Signature Version 4 (SigV4) and OAuth 2.0 authentication. The container must be built for linux/arm64 and bind to 0.0.0.0. The /ping endpoint is the health contract: {"status": "Healthy"} means idle and waiting; {"status": "HealthyBusy"} keeps the session alive past the idle timeout for background work.

Gateway, Memory, and Policy

Gateway is a fully-managed AI gateway — a single, secure entry point for agentic traffic. It aggregates MCP targets into one virtual MCP server, proxies HTTP targets, and (since June 2026) routes LLM traffic to model providers via unified inference targets. It also handles inbound auth, credential injection per tool, and semantic tool selection to keep prompts small.

Memory is two-tier: short-term (turn-by-turn within a session) and long-term (persists across sessions, extracting user preferences, facts, and summaries). Three strategy tiers trade cost against control, from fully built-in extraction ($0.75 per 1,000 records/month) down to self-managed pipelines ($0.25). Memory stores are shareable across agents — the substrate for multi-agent state sync.

Policy is where the architecture gets genuinely interesting. It intercepts all agent traffic through Gateway and evaluates each request against policies written in Cedar (AWS’s open-source policy language) before allowing tool access. Policy sits as a boundary outside the agent’s code — every tool call is intercepted and evaluated deterministically, no matter how the agent is implemented. This prevents policy bypass through agent manipulation. But hold that thought: as the security section shows, Cedar constrains what tools can be called, not what reasoning leads the agent to call them.

The end-to-end request flow, from client authentication through Cedar-gated tool calls to a streamed response

Figure 3 — A production request: authenticate with an Identity Provider, invoke Runtime, run the loop in a microVM, and route every tool and model call through the Cedar-policed Gateway — all traced via OpenTelemetry to CloudWatch.


The Developer Experience: Building with AgentCore

The BedrockAgentCoreApp pattern

Every code-based agent wraps a single class from the bedrock_agentcore Python SDK. It extends Starlette (a Python web framework) and exposes three routes — POST /invocations, GET /ping, and a WebSocket. You register your logic with the @app.entrypoint decorator:

from bedrock_agentcore import BedrockAgentCoreApp
from strands import Agent
app = BedrockAgentCoreApp()
@app.entrypoint
async def handler(request):
prompt = request.get("prompt")
agent = Agent()
async for event in agent.stream_async(prompt):
yield event
app.run()

Return an async generator and the response streams as SSE; return a plain dict and it’s a JSON response. The entrypoint optionally receives a context object carrying session_id and request headers — the hook for session-aware, multi-user agents.

The deployment loop is agentcore create → agentcore dev (local hot-reload with a browser-based inspector) → agentcore deploy → agentcore invoke. One caveat that bites newcomers: the older Python bedrock-agentcore-starter-toolkit is deprecated in favor of the Node.js @aws/agentcore CLI, yet most tutorials online still use the deprecated toolkit. Both share the agentcore command name, which causes collisions.

The “meta tool” multi-agent pattern

The most sophisticated real-world pattern comes from the aws-samples/sample-multi-agent-on-agentcore repo: a central orchestrator that dynamically discovers sub-agents from the AgentCore Registry and generates typed tools from their JSON schemas at startup.

  1. Discovery — query the Registry for approved agents and fetch their MCP tool descriptors.
  2. Dynamic tool generation — for each agent, use exec() to synthesize a Python function whose signature matches the schema, then apply the @tool decorator.
  3. Invocation — each generated tool opens a temporary MCP session to the Gateway and calls the sub-agent.
  4. Semantic search — past ~10 agents, a search_agents tool backed by Registry semantic search is added.

The payoff: adding a new sub-agent requires zero orchestrator code changes — register it in the Registry with an MCP descriptor and it’s automatically available.

Memory that’s transparent to the agent

The canonical practitioner pattern integrates Memory through Strands lifecycle hooks: a MessageAddedEvent hook retrieves relevant memories and injects them before processing a query, and an AfterInvocationEvent hook saves the interaction afterward. The agent code never changes — conversations are persisted and recalled automatically.


Human-in-the-Loop: Patterns and Gaps

Here’s the most consequential operational finding: AgentCore has no native construct that pauses agent execution, waits for human input, and resumes. Unlike LangGraph’s interrupt() or AWS Step Functions’ callback patterns, AgentCore’s services are built around synchronous or streaming execution with deterministic policy enforcement. Human-in-the-loop (HITL) must be composed from other services or handled at the framework layer.

The aws-samples/sample-human-in-the-loop-patterns repo offers four deployable methods:

MethodApproachApproval model
Hook systemA framework hook intercepts tool calls before executionCentralized, blanket
Tool contextApproval logic embedded in each tool with Role-Based Access Control (RBAC)Per-tool, fine-grained
Step FunctionsAsync workflow emails an external approver via SNSThird-party, asynchronous
MCP elicitationAn MCP server uses ctx.elicit() for real-time interactive approvalProtocol-native, real-time

Cedar can help — it can enforce input conditions like context.input.amount < 1000 to gate high-risk actions. But it evaluates synchronously and returns only permit or deny; it cannot pause to request human approval for gray-zone actions (a refund between $1,000 and $10,000 needing manager sign-off). For asynchronous approval, AWS Step Functions with the .waitForTaskToken callback pattern is the canonical answer.

Three gaps remain unfilled: no “approval required” response code (Gateway is binary permit/deny), no AWS-published end-to-end “pause, review, resume” reference architecture, and no interruption API to pause a running invocation mid-execution.

A financial-services architecture decision record adds a sharp warning: the requireConfirmation flag “can be bypassed by prompt formulation.” If the system prompt tells the agent to “be proactive and execute without unnecessary confirmation,” the model may rationalize skipping it. The recommendation: defend with the Gateway flag and an explicit system-prompt instruction.


The Comparison: Escaping the Category Error

The correct mental model bears repeating: AgentCore is a hosting layer, not a competing framework. “AgentCore vs. LangGraph” is malformed. The right comparisons are AgentCore vs. Azure AI Foundry Agent Service (both managed hosting layers) and LangGraph vs. CrewAI (both frameworks). AWS’s own Strands Agents is the framework that competes with LangGraph; AgentCore is the platform that hosts them all.

Against its closest peer, Azure AI Foundry:

DimensionAgentCoreAzure AI Foundry
Framework support8+ frameworks5+ frameworks
Model supportAny LLM (Bedrock, OpenAI, Gemini, Anthropic)Foundry catalog
PolicyCedar policy engineContent safety filters
PaymentsBuilt-in (Stripe, Coinbase)Not documented
DistributionRuntime endpointTeams, M365 Copilot, Entra registry

Azure has deeper enterprise distribution and a no-code agent tier; AgentCore has more framework choices, native payments, and Cedar policy. Choose AgentCore if you’re on AWS and want managed infrastructure with policy enforcement across any framework; choose Azure for Microsoft-stack distribution; choose LangGraph or CrewAI directly when you want maximal control over the agent graph itself.


Security: The Unresolved Attack Surface

This is the section that should give architects pause. Researchers from Sonrai Security, Palo Alto Networks Unit 42, BeyondTrust Phantom Labs, the Cloud Security Alliance (CSA), and Zenity have documented a series of vulnerabilities — most of which AWS classifies as “expected design behavior” rather than defects, placing the mitigation burden on customers.

VulnerabilityStatusAWS position
Code Interpreter privilege escalationOpen”Expected design behavior”
Domain Name System (DNS) tunneling sandbox escapeOpen”Expected”; use VPC mode
Amazon S3 HTTPS sandbox escapeOpen”Expected” (data operations)
microVM metadata credential exfiltrationPartially patchedv2 default for new agents (Feb 2026)
Memory poisoning via prompt injectionOpen”Not a platform vulnerability” — an LLM problem
CVE-2026-12530 argument injectionPatchedFixed in SDK v1.6.1
Over-privileged Identity and Access Management (IAM) rolesPartially mitigatedDocs warning added; broad roles still auto-generated

Three findings deserve elaboration:

The Cedar caveat, made concrete: policies gate which tools an agent may call, not why it calls them. An injected instruction that manipulates the agent’s reasoning to use a permitted tool for an unintended purpose is invisible to Cedar. The CSA’s warning is blunt: “Enterprise teams should not interpret Cedar Policy adoption as a comprehensive mitigation for prompt injection risk.”

Exactly one CVE in this set was promptly patched — CVE-2026-12530, an argument-injection flaw in the SDK’s install_packages(), fixed in bedrock-agentcore 1.6.1. Notably, it was the one reported by an independent researcher rather than a security vendor.


Cost and Performance: Real-World Numbers

AgentCore’s cost model rewards expertise and punishes naivety. Two case studies frame the range.

The $14.50 → $0.40 optimization. A real enterprise ran a browser-operation agent whose naive implementation re-sent the full conversation history every loop, costing $14.50 per process. Three levers, applied in order: prompt caching ($14.50 → $2.10), prompt tuning (→ $1.00), and model right-sizing from Claude Sonnet to Haiku (→ $0.40). The order matters — caching first for the biggest absolute dollar impact, model swap last because it carries the most quality risk. Critically, the savings landed almost entirely on the model token line, not AgentCore’s per-component pricing.

The $6,500/month observability trap. AWS’s own pricing example produces $6,500/month in telemetry alone, before any inference. AgentCore Observability is a CloudWatch pass-through with no native cap. The fix — percentage-based span sampling (10% captures enough for anomaly detection) — cuts it ~90%. This is the single most underestimated line in practitioner bills.

Two defaults dominate the bill:

One counterintuitive performance finding: the microVM is not the bottleneck — the LLM is. A stress test of 100 parallel tool calls kept the microVM at 0.8 vCPU average with zero throttles; 75% of total time was autoregressive LLM decode. More compute quota doesn’t help, because token generation is sequential per request.


Where the Sources Disagree

The platform’s velocity makes many “contradictions” merely temporal — two sources correct at different dates:


Devil’s Advocate: The Case That This Report Is Overstated

Intellectual honesty demands the counter-argument:


The honest bottom line: AgentCore is production-capable for teams with strong AWS expertise who can navigate its security and operational complexity — not the “deploy in one command” experience the marketing implies. The infrastructure is real and genuinely distinctive; the maturity bar for using it safely is higher than it looks.