3.6.3. AI Agent Architectures with Amazon Bedrock AgentCore
💡 First Principle: An agent is a loop in which a model decides which tool to call next. The architecture must give that loop isolated compute, governed tool access, memory and observability, independent of the framework or model the team chose.
Scenario: A support organization wants an agent that reads tickets, looks up orders through an internal REST API, checks a knowledge base and files refunds in a SaaS system. Developers use LangGraph today, sessions can run for over an hour, and one customer's conversation must never leak into another's.
Amazon Bedrock AgentCore is a set of modular services that work with any framework (Strands Agents, LangGraph, CrewAI, LlamaIndex and others) and any model, inside or outside Bedrock. For new builds it replaces "Amazon Bedrock Agents", which is now Bedrock Agents Classic and closed to new customers.
| Service | What it provides |
|---|---|
| Runtime | Serverless hosting for agents and MCP servers. Each session runs in its own microVM with isolated CPU, memory and filesystem; sessions last up to 8 hours (longer on the Instances compute type); payloads up to 100 MB; MCP and A2A protocols; CPU billing tracks active processing, not time spent waiting for the model |
| Gateway | Turns Lambda functions, OpenAPI and Smithy APIs into MCP tools, connects existing MCP servers, adds semantic tool search, and handles inbound and outbound authentication |
| Identity | Agent workload identities, inbound auth from your IdP, OAuth/API-key credentials for tools in a token vault (see 3.6.5) |
| Memory | Short-term conversation memory and long-term memory that persists across sessions |
| Code Interpreter / Browser | Sandboxed code execution and a managed cloud browser |
| Policy | Deterministic rules (Cedar-compatible) evaluated on every tool call at the gateway |
| Observability / Evaluations | OpenTelemetry traces and metrics in CloudWatch, and LLM-as-a-judge scoring of agent sessions (see 3.6.8) |
Design choices that the exam rewards:
- Tools through Gateway, not hard-coded clients. Wrapping the order API (OpenAPI spec) and the refund function (Lambda) as Gateway targets gives every agent the same governed, authenticated tool catalog.
- Knowledge in a knowledge base. Give the agent a
"Bedrock Knowledge Base"as a retrieval tool instead of stuffing documents into the prompt. - Deterministic steps stay deterministic. If a business process has fixed steps, orchestrate them in
"AWS Step Functions"and call the agent (or model) for the step that needs reasoning; agents are for open-ended tool selection. - Multi-agent designs let specialist agents talk over A2A, each hosted in its own Runtime with its own identity and least-privilege tools.
⚠️ Exam Trap: Running agents for many users on a shared container fleet, or choosing Bedrock Agents for a new project, both look reasonable. The first loses per-session isolation that AgentCore Runtime provides by default; the second picks a service closed to new customers.