Home / AI News / Bedrock AgentCore V2

Amazon Bedrock AgentCore Runtime V2: Architecture Patterns for Fast Session Startup

AWS published a best-practices architecture guide on November 13, 2026 explaining how Amazon Bedrock AgentCore runtime V2 snapshots initialized microVMs and how to reach fast or sub-second session startup.

Spark5X · · Amazon / AWS

AWS published an engineering architecture guide on November 13, 2026 detailing how to achieve fast session startup on Amazon Bedrock AgentCore runtime V2 using microVM snapshots, build warmup hooks, and session pre-warming. Written by AWS engineers and solutions architects Evandro Franco, Massimiliano Angelino, Ivan Rivera, Phelipe Fabres, Abhishek Singh, and Vignesh Somasundaram—following AWS's November 12, 2026 announcement of the next-generation AgentCore runtime—the guide explains how platformVersion="V2" shifts container initialization to deployment time and outlines four patterns for bringing startup latency down to around two seconds or sub-second on user engagement.

Key takeaways
  • Published on November 13, 2026 on the AWS Machine Learning Blog, the guide explains how Amazon Bedrock AgentCore runtime V2 snapshots an initialized Firecracker microVM once at deployment time and restores it for each new session.
  • As announced by AWS on November 12, 2026, the next-generation AgentCore runtime starts sessions in under 2 seconds (up to 15x faster), scales 4x up to 8 vCPUs, 32 GB of memory, and 10 GB images, reclaims unused memory within minutes (cutting session memory use by up to 68%), and supports Amazon S3 FUSE mounts.
  • On V2, AWS recommends running imports, creating boto3 clients, loading static data into memory, and compiling Python bytecode during init before app.run(), while keeping dynamic catalogs, random nonces, and wall-clock timestamps in the handler.
  • AgentCore runtime V2 also supports HTTP POST build warmup hooks (memory and disk phases) and background session pre-warming on user engagement, where an already-running session answers in about 200 ms.

1. How does Amazon Bedrock AgentCore runtime V2 start a session?

Amazon Bedrock AgentCore runtime runs each agent session inside its own isolated microVM. With platformVersion set to V2, AgentCore starts your container once during deployment, waits up to 120 seconds for a healthy GET /ping, clears the OS file cache, freezes the microVM into a snapshot, and restores that snapshot for every new session.

On the earlier V1 runtime, starting a session required pulling the container image from Amazon ECR, starting the container, and running initialization code before processing the first request, so cold start grew with image size. In the next-generation V2 runtime (announced November 12, 2026 and detailed in the November 13, 2026 guide), that work runs once during create or update:

  • Memory comes back whole: Anything the agent process holds in memory at snapshot time—plus files in a RAM-backed filesystem such as /dev/shm—is available at memory speed from the first access.
  • File cache reads do not carry over: The OS file cache is cleared before the freeze to keep the snapshot small, so reading a file during init without keeping its bytes in memory does not speed up restored sessions.
  • Image files load lazily on first read: Blocks from the container image are fetched from snapshot storage on first read. Sessions scale up to 8 vCPUs, 32 GB of RAM, and 10 GB images, while unused memory is reclaimed within minutes and idle sessions scale to zero.

2. How do you measure session startup latency on AgentCore runtime?

AgentCore runtime publishes two core metrics to Amazon CloudWatch under the AWS/Bedrock-AgentCore namespace: Latency (time to first byte) and OverheadLatency (platform time to start the microVM and restore the snapshot). Subtracting OverheadLatency from Latency isolates the time spent inside your agent's handler code.

Because init runs once while the snapshot is built, initialization time appears in build logs (when logged before app.run()) rather than request metrics. AWS recommends evaluating percentiles (P90, P99) or trimmed means (TM90): when OverheadLatency dominates, use build hooks or pre-warming; when handler time spikes on the first request, add custom spans in AgentCore Observability and move static setup into init.

Agent workload or data typeRecommended AgentCore V2 patternWhy it works on V2 microVM snapshots
Imports, boto3 clients & static promptsRun during init before app.run() and set UV_COMPILE_BYTECODE=1.Modules, endpoint/credential resolution, and in-memory objects are frozen into the snapshot and restored immediately.
CLI toolchains (e.g., tsc) or helpersCopy CLI files to /dev/shm or keep helper processes alive over a pipe/socket during init.RAM-backed filesystems and active child processes survive the snapshot in memory instead of reading from disk per session.
Large files or browser binariesConfigure a V2 build warmup hook (hooksConfiguration) handling memory and disk POST calls.Primes shared memory before the freeze and reads startup files during a test restore so new sessions fetch blocks faster.
Large reference datasetsMount Amazon S3 Files (with FUSE support) or Amazon EFS through an access point during init.Keeps data inside the session's hardware-isolated trust boundary without inflating the microVM memory snapshot.
Dynamic catalogs, random secrets & timeCreate or refresh in the handler using secrets, os.urandom(), uuid.uuid4(), and time.time().Prevents sessions (up to 8 hours) from sharing identical PRNG state, fixed timestamps, or stale AgentCore Gateway catalogs.
Chat & voice apps needing sub-second repliesPre-warm a session in the background with a 33+ character runtimeSessionId when the user opens the UI.Hides the ~2-second session startup so the already-running session answers the user's first prompt in ~200 ms.

3. How should developers restructure init code and use V2 build warmup hooks?

On AgentCore runtime V2, developers should move static work—imports, object creation, boto3 client setup, in-memory data loading, and bytecode compilation—into init before app.run(). For files or binaries that cannot stay in process memory, V2 supports HTTP POST build warmup hooks with memory and disk phases.

While boto3 clients reconnect sockets cleanly on first use, other network clients should close connections before the snapshot. For files or binaries that cannot remain in process memory, teams can set hooksConfiguration on platformVersion="V2" (using an unreserved port from 8000 to 12000, such as POST /warmup). AgentCore sends two POST calls sharing a 120-second budget via the X-Amzn-Bedrock-AgentCore-Runtime-Warmup-Type header: memory (before the freeze on the build microVM) and disk (after a test restore on a separate microVM to read startup files). Returning anything other than 2xx fails the create or update without retry.

4. What snapshot pitfalls must stay in the request handler, and how does session pre-warming work?

Because every session restored from a V2 snapshot starts with an identical copy of init memory, random numbers, cryptographic nonces, wall-clock timestamps, rate limiters, expiring credentials, and dynamic AgentCore Gateway tool catalogs must be created or refreshed in the handler. For sub-second chat responses, teams can pre-warm sessions on user engagement.

  • Keep dynamic and per-session values in the handler: Sessions run until their idle timeout (idleRuntimeSessionTimeout, 15 minutes by default, from 60 seconds to 8 hours) or maximum lifetime (maxLifetime, 8 hours). Generate random values in the handler with secrets, os.urandom(), or uuid.uuid4(), use time.time() for wall-clock checks, and cache AgentCore Gateway tool catalogs in the handler with a TTL (such as 5 minutes).
  • Pre-warm on user engagement: While a new session takes about 2 seconds to start, a running session answers in about 200 ms. When a user opens a chat window, generate a 33+ character runtimeSessionId and send a background {"action": "prime"} call via invoke_agent_runtime so the session is running before the first prompt arrives.

5. How does AgentCore runtime V2 fit into enterprise AI agent infrastructure?

Available across AWS Regions in North America, South America, Europe, and Asia Pacific, AgentCore runtime V2 pairs hardware-isolated Firecracker microVM execution with fast snapshot restores, elastic memory reclamation, and S3 FUSE data mounts so enterprises can run interactive and autonomous agents at scale.

Paired with NVIDIA NeMo Switchyard routing on Amazon Bedrock, BigQuery Agent Analytics, and Gemini 4 Hydrogen in GitHub Copilot, AgentCore runtime V2 helps teams pair low-latency agent execution with analytics and attribution, conversion rate optimization, and AI News benchmarks.

Frequently asked questions

How does Amazon Bedrock AgentCore runtime V2 start a new agent session?

Each session on Amazon Bedrock AgentCore runtime runs in its own isolated Firecracker microVM. When platformVersion is set to V2, AgentCore starts your container once during runtime creation or update, waits up to 120 seconds for a healthy GET /ping, clears the OS file cache, freezes the microVM into a snapshot, and restores that snapshot for each new session so memory returns whole and image files load lazily on first read.

What performance and scaling updates did AWS announce for the next-generation AgentCore runtime?

In its November 12, 2026 announcement, AWS stated that sessions on the next-generation AgentCore runtime start in under 2 seconds (up to 15x faster) independent of image size, scale 4x up to 8 vCPUs and 32 GB of memory with container images up to 10 GB, reclaim unused memory within minutes to reduce session memory consumption by up to 68%, and support mounting Amazon S3 buckets with FUSE support.

How do you measure session startup and handler latency on AgentCore runtime?

AgentCore runtime publishes two Amazon CloudWatch metrics in the AWS/Bedrock-AgentCore namespace: Latency (time to first byte) and OverheadLatency (platform time to start the microVM and restore the snapshot). Subtracting OverheadLatency from Latency gives the time spent in the agent's handler code, while one-time V2 init duration can be logged before app.run() in the runtime's build logs.

How do V2 build warmup hooks work in Amazon Bedrock AgentCore runtime?

Configured via hooksConfiguration on V2 runtimes, a build hook exposes an HTTP POST endpoint (on an unreserved port from 8000 to 12000) that AgentCore calls twice during build within a shared 120-second window using the X-Amzn-Bedrock-AgentCore-Runtime-Warmup-Type header: first with 'memory' before the snapshot freeze to load shared state into memory, and second with 'disk' after a test restore to read startup files so restored sessions fetch blocks faster.

What must stay in the request handler on V2, and how do teams get sub-second startup?

Because every restored session starts with an identical copy of init memory, random values and secrets (using secrets, os.urandom(), or uuid.uuid4()), wall-clock timestamps (time.time()), timers, expiring credentials, and dynamic AgentCore Gateway tool catalogs must be created or refreshed in the handler. To reach sub-second responses (~200 ms on a running session), backends can pre-warm a session with a 33+ character runtimeSessionId when a user opens the chat window.

More AI news

All AI news →

Get started
Put this to work
Talk to us about using new AI tools in your marketing and growth systems.
    0/1000
    Prefer to pick a time? Book a call →
    🔒 We'll only use your details to reply. See our Privacy Policy.
    Keep reading

    Related AI news

    Request a quoteBook a call