Running Agents in Production with Amazon Bedrock AgentCore
This lesson describes the modular Amazon Bedrock AgentCore services for hosting, memory, tools, identity and observability that let agents built with any framework and model run securely and reliably for many users.
Learning outcomes
After completing this lesson, you will be able to:
- Describe what AgentCore Runtime provides for long-running agent sessions.
- Distinguish AgentCore Memory, Gateway and Identity.
- Identify the built-in tools, observability and policy services.
AgentCore Runtime
Running agents in production raises problems that a simple web service does not have: sessions can last many minutes or hours, agents run code and handle sensitive data on behalf of different users, and agent frameworks change quickly. Amazon Bedrock AgentCore Runtime is a managed service for hosting agents and MCP servers built with any framework, such as Strands Agents or other open-source frameworks, packaged as containers or code.
Each user session runs in its own isolated environment, a dedicated microVM, which prevents data from leaking between sessions or users. Runtime scales automatically, supports long-running sessions of up to several hours and large payloads, streams responses, and supports the HTTP, MCP and Agent2Agent (A2A) protocols. Agents are deployed as versioned runtimes with endpoints, so a new version can be tested before production traffic is moved to it.
Moving an agent to production
AgentCore Memory, Gateway and Identity
AgentCore Memory stores short-term memory as events within a session and builds long-term memory with strategies that extract summaries, user preferences and semantic facts, which agents retrieve in later sessions. AgentCore Gateway converts Lambda functions, OpenAPI and Smithy API definitions and existing MCP servers into MCP tools behind one endpoint, with authentication, and offers semantic search over tools so agents with many tools can find the right one.
AgentCore Identity manages agent identities and credentials: inbound authentication of users and applications through identity providers such as Amazon Cognito or other OAuth providers, and outbound access to AWS resources and third-party services through credential providers and a secure token vault, so agents can act on behalf of users with their consent without embedding secrets in code.
The following diagram maps each shortcut in an agent prototype to the AgentCore service that replaces it in production.

AgentCore services
Built-in tools, observability and policy
AgentCore also provides managed tools and operational services that agents commonly need. AgentCore Code Interpreter runs code that an agent writes in an isolated sandbox, so the agent can perform calculations and data analysis reliably instead of estimating numbers. AgentCore Browser provides a managed, isolated web browser that an agent controls to read and interact with websites that have no API.
AgentCore Observability emits OpenTelemetry traces, metrics and logs for every step, tool call and model invocation of an agent, which can be viewed in the Amazon CloudWatch generative AI observability dashboards and used to diagnose failures and latency. Newer capabilities add policy controls that allow or deny specific tool calls (AgentCore Policy) and evaluation of agent quality (AgentCore Evaluations).
The following table summarises the services.
| Service | Provides |
|---|---|
| Runtime | Serverless, session-isolated hosting for agents and MCP servers |
| Memory | Short-term events and long-term extracted memories |
| Gateway | APIs, Lambda functions and MCP servers exposed as MCP tools, with tool search |
| Identity | Inbound authentication and outbound credentials for agents |
| Code Interpreter | Sandboxed code execution |
| Browser | Managed, isolated web browser for agents |
| Observability | OpenTelemetry traces, metrics and dashboards in CloudWatch |
| Policy and Evaluations | Controls on tool calls; agent quality scoring |
From prototype to production
A team built a Strands agent prototype on a laptop that calls internal APIs with hard-coded keys and keeps memory in a local file. For production it needs per-user session isolation, user personalisation across sessions, OAuth access to a SaaS calendar on the user's behalf, and traces.
The production design deploys the agent to AgentCore Runtime, stores memory in AgentCore Memory with a user preference strategy, exposes internal APIs through AgentCore Gateway, obtains calendar tokens through AgentCore Identity and monitors with AgentCore Observability, with no hard-coded secrets.
Which AgentCore service keeps user preferences and facts across sessions?
Show answer
AgentCore Memory, through its long-term memory.
Exam Tips
Remember for the exam
- Runtime: framework-agnostic hosting with per-session isolation.
- Memory: short-term events plus long-term summaries, preferences and facts.
- Gateway: Lambda functions and APIs become MCP tools.
- Identity: OAuth inbound and outbound credentials without hard-coded secrets.
- Observability: OpenTelemetry traces in CloudWatch.