---
title: "AgentCore Runtime — serverless hosting for any-framework agents"
date: 2026-05-26
service: "Amazon Bedrock AgentCore"
component: "Runtime"
tags: [agentcore, runtime, serverless, strands, langgraph, mcp, sessions, arm64, container]
source: https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/what-is-bedrock-agentcore.html
verified_on: 2026-05-26
url: https://vanemmerik.ai/aws-ai/2026-05-26.html
---

# AWS Bedrock & AgentCore · Tip of the Day · 2026-05-26

## AgentCore Runtime — serverless hosting for any-framework agents

**AgentCore Runtime** is the secure, serverless execution environment at
the centre of Amazon Bedrock AgentCore. Bring an agent written in any
framework — Strands, LangGraph, LlamaIndex, Google ADK, OpenAI Agents —
pointed at any foundation model, and Runtime gives it isolated sessions,
fast cold starts, and a long enough timeout to actually finish the job.

    $ npm install -g @aws/agentcore
    $ agentcore create --name MyAgent --defaults
    $ agentcore deploy

≈ 6 min read · Bedrock AgentCore · Inaugural drop

---

## 01 · Why AgentCore Runtime exists

Hosting an agent is not the same problem as hosting a web service. Agents
hold conversation state, call tools, stream tokens for minutes at a time,
and have to be isolated from each other so one user's session never sees
another's. AWS Lambda is too short for long reasoning loops; ECS or EKS
gives you a cluster to operate; rolling your own EC2 means rolling your
own session manager and identity layer.

**AgentCore Runtime** removes that whole layer. You give it a container
image (or let the CLI build one for you), and it runs your agent
behind an HTTP endpoint with these guarantees baked in:

- **True session isolation.** Each invocation runs in its own session
  context; one user's conversation never crosses into another's.
- **Fast cold starts** for chat-style real-time interactions, plus
  extended runtime for asynchronous background agents — up to **8 hours**
  per session (well past Lambda's 15-minute ceiling).
- **Framework-neutral.** Strands, LangChain/LangGraph, Google ADK,
  OpenAI Agents — Runtime doesn't care.
- **Model-neutral.** Anthropic Claude, Amazon Nova, OpenAI, Gemini,
  Meta Llama, Mistral — pick whichever your agent needs.
- **Protocol-neutral.** HTTP for chat, MCP for tool servers, A2A for
  agent-to-agent.

> **The shift.** Runtime is the missing primitive between "Lambda for
> short requests" and "a Kubernetes cluster you operate yourself." You
> write the agent code; AWS runs the agent lifecycle.

---

## 02 · The fastest path: the AgentCore CLI

The official path from "no code" to "deployed agent" is the AgentCore
CLI — distributed as an npm package, scaffolds a project, deploys via
CDK, and invokes the running endpoint.

    # Prereqs: Node 20+, Python 3.10+, AWS CDK installed, AWS creds configured

    npm install -g @aws/agentcore
    agentcore --help

    # Scaffold a new Strands agent on Bedrock with no memory
    agentcore create --name MyAgent --defaults
    cd MyAgent

    # Test locally — opens the agent inspector in your browser
    agentcore dev

    # Deploy to AWS via CDK
    agentcore deploy

    # Invoke it
    agentcore invoke "Hello, tell me a joke"

The `agentcore create` flags worth knowing:

- `--framework` — `Strands`, `LangChain_LangGraph`, `GoogleADK`,
  `OpenAIAgents`.
- `--protocol` — `HTTP` (default), `MCP`, `A2A`.
- `--build` — `CodeZip` (default) or `Container`. Use `Container` when
  you need extra system dependencies in the image.
- `--model-provider` — `Bedrock`, `Anthropic`, `OpenAI`, `Gemini`.
- `--memory` — `none`, `shortTerm`, `longAndShortTerm`. Wires up
  AgentCore Memory automatically.

The scaffold drops you into a project with three things that matter:
`agentcore/agentcore.json` (project + agent config), `app/MyAgent/main.py`
(your agent code), and `aws-targets.json` (account + region targets).

---

## 03 · The container contract

If you bring your own container (the "no CLI" path), Runtime expects a
small contract from the image — and the failure modes when you get it
wrong are obvious enough to be worth memorising.

| Requirement | Why |
| --- | --- |
| **ARM64** image (`linux/arm64`) | AgentCore Runtime is Graviton. An x86 image fails to start with `exec /bin/sh: exec format error`. |
| HTTP listener on `:8080` | Runtime's data-plane invokes your container over HTTP at port 8080. |
| `POST /invocations` endpoint | The request path Runtime calls with each user prompt. |
| `GET /ping` endpoint | Liveness check. Return 200 OK; anything else and Runtime declares the instance unhealthy. |
| `runtimeSessionId` available in request | Use it to tag your downstream resources so multiple concurrent sessions don't collide. |

The starter Dockerfile from the docs uses `FROM public.ecr.aws/docker/library/python:3.12-slim` with
`--platform=linux/arm64` on the build, then `pip install` for the agent
framework plus FastAPI/Uvicorn for the HTTP layer. The CLI's `--build Container`
mode generates this for you.

---

## 04 · Sessions, endpoints, versions

Three concepts you'll see repeatedly:

- **Runtime** — the deployed agent itself. Configuration is immutable
  per **version**; every time you push a change, AgentCore creates a new
  version automatically.
- **Endpoint** — a named, mutable pointer to a version. The `DEFAULT`
  endpoint advances to the newest version on every deploy. Create
  additional endpoints (e.g. `production`) and pin them to a specific
  version when you need stability.
- **Session** — an isolated execution context for one conversation.
  Identified by `runtimeSessionId`. A session can stay open for up to
  **8 hours**; cold starts on a new session are designed for chat-level
  latency.

Together: `Runtime → Version → Endpoint → Session`. Endpoints decouple
clients ("hit the `production` endpoint") from versions ("v17 is the
build we shipped on Tuesday").

---

## 05 · How Runtime fits with the rest of AgentCore

Runtime is one of eleven AgentCore services. It's the host; the others
plug in:

- **Identity** — handles agent-side OAuth and credential vending so your
  Runtime container never sees long-lived secrets.
- **Memory** — short-term and long-term memory stores Runtime sessions
  can read and write.
- **Gateway** — turns your existing APIs and Lambdas into MCP tools the
  Runtime agent can call.
- **Observability** — every Runtime invocation emits OpenTelemetry spans
  to CloudWatch Transaction Search; enable it once and the agent
  inspector lights up automatically.
- **Code Interpreter / Browser** — sandboxed tools the Runtime agent
  invokes when it needs to execute code or drive a webpage.

Runtime can run completely standalone — none of the others are required —
but the value compounds quickly when you bring two or three of them in.

---

## 06 · Limits worth knowing on day one

- **ARM64 only.** No exceptions. Build with `--platform=linux/arm64` or
  the image won't start.
- **8-hour session ceiling.** Long, but not infinite. Plan checkpointing
  if your agent legitimately needs longer.
- **`/invocations` and `/ping` are mandatory.** Both must exist; both
  must return promptly. CloudWatch logs will tell you when `/ping`
  starts failing.
- **`agent-core` (with a hyphen) shows up in some error messages**, but
  the boto3 client is `bedrock-agentcore`. Common copy-paste trip.
- **Observability is opt-in.** Enable CloudWatch Transaction Search
  once per account/region or you'll see "spans are missing" in the
  agent inspector.

---

## 07 · Try it in five minutes

If you have Node 20+, Python 3.10+, the AWS CDK installed, and AWS
credentials configured, the full happy path is four commands:

    npm install -g @aws/agentcore
    agentcore create --name HelloAgent --defaults
    cd HelloAgent && agentcore dev   # local inspector at localhost:8080
    agentcore deploy                  # CDK deploys Runtime + IAM + ECR

`agentcore status` shows the deployed endpoint URL; `agentcore invoke
"Hello"` sends a prompt; `agentcore logs --tail` streams CloudWatch.

Tomorrow we'll look at the **`/invocations` HTTP contract** in detail —
what the request and response actually look like on the wire when you
bypass the CLI and call Runtime directly with `boto3` or `curl`.

---

**Verified against the official docs on 2026-05-26.**
Sources:
<https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/what-is-bedrock-agentcore.html>,
<https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-get-started-cli.html>,
<https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/getting-started-custom.html>,
<https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agent-runtime-versioning.html>.

If the docs change, this lesson is a snapshot of that day — check the
sources for current behaviour.

---

> **This page — research, writing, verification, and deployment — was built by
> Claude Cowork.** No human touched the prose, the layout, or the upload
> pipeline. The lesson was generated this morning, cross-checked against the
> official AWS docs by an independent verification pass, and published
> to Cloudflare R2 on a schedule.
>
> A daily experiment by Monty van Emmerik · <https://vanemmerik.ai/>

— AWS Bedrock & AgentCore · Tip of the Day · No. 001 · vanemmerik.ai
