Introduction
You can write an agent in forty lines of Python. Call a model, give it a few tools, loop until it stops asking for them. The demo works on the first afternoon, and that afternoon is exactly why so many agent projects die: the demo looks 90% done, and the remaining 90% is invisible until you try to put the thing on call.
This book is about that remaining 90%, built on AWS.
By the end of the full book you will have designed and built a production agent platform: a system that can run one agent or a swarm of hundreds, inside real isolation boundaries, with per-run budgets, replayable state, evaluation gates in CI, and an on-call runbook. Not a framework tour, and not a chat app with a tools array. A system you could hand to a team and defend in a design review.
Why this book exists
There are plenty of tutorials that show you how to call Bedrock, and plenty of framework docs that show you how to wire up an agent loop. What is hard to find is the middle layer: how the pieces compose into a system, what AWS is actually doing under the hood when you use its managed agent services, and what breaks at scale. Three convictions shape everything here:
-
Internals first. You cannot operate what you cannot explain. So we open the boxes: how Firecracker microVMs give Lambda and Bedrock AgentCore their isolation story, how Step Functions distributed map fans out to thousands of workers, how prompt caching changes the economics of a long agent session, how an event-sourced agent state store makes replay possible. When we use a managed service, we first build a small version of the idea ourselves.
-
Local first, cloud second. Every distributed-systems concept in this book gets a runnable local lab before it gets an AWS deployment: a swarm scheduler simulated in pure Python, a token-bucket model of rate-limit sharing, a checkpoint-and-replay harness, a budget governor. The local labs run on your laptop for free and produce real output you can verify. The cloud labs are priced, tiered, and always paired with a teardown step.
-
Production is a set of properties, not a vibe. "Production ready" gets thrown around loosely. Chapter 1 pins it down as twelve concrete gates (identity, isolation, budgets, replay, evals, observability, and so on), and every later part of the book exists to pass one or more of them.
What you will build
The spine of the book is one platform, which we call Hive. Hive is a multi-agent execution platform: you submit a task, the control plane shards it into work units, a fleet of agents executes those units in parallel inside sandboxes, verifier agents check the results adversarially, and a merger assembles the outcome, all under a hard token budget with checkpointed progress you can resume after any failure.
Hive is deliberately shaped like the hardest common case. If you can run five hundred agents against a large code repository overnight, with isolation, budgets, and resumability, then a single support agent or a document pipeline is a strict subset of what you already know how to build. The capstones at the end of the book apply the same platform to four different jobs: a repository-audit fleet, an incident-response agent, a document-intake swarm, and a deep-research service.
Along the way you will work with the real AWS stack for this problem:
- Amazon Bedrock as the model plane: the Converse API, inference profiles
and cross-region routing, prompt caching, batch inference, guardrails, and
quota engineering. Claude models on Bedrock carry an
anthropic.prefix (for exampleanthropic.claude-opus-4-8); the book uses Claude throughout and explains the id and client conventions when they first appear. - Amazon Bedrock AgentCore as the managed agent runtime: Runtime session isolation in microVMs, Memory, Gateway (turning your APIs into MCP tools), Identity, Code Interpreter, Browser, and Observability. We dissect what each component replaces so you can decide when to buy and when to build.
- AWS Lambda, Step Functions, EventBridge, and SQS as the serverless skeleton: tool hosts, event-driven triggers, distributed map fan-out, human approval callbacks, dead-letter queues, and idempotency.
- Firecracker as the isolation substrate: the microVM technology under Lambda, Fargate, and AgentCore, which we also run directly to build our own code-execution sandbox and understand exactly what the managed services are selling us.
- DynamoDB, S3 Vectors, and OpenSearch as the state and memory layer: event-sourced agent state, checkpoints, and the vector-store decision matrix.
- Strands Agents, MCP, and A2A as the open protocol layer: AWS's open-source agent SDK, the Model Context Protocol for tools, and the Agent2Agent protocol for cross-agent communication.
Don't be confused: "agents on AWS" vs "AWS's agents." This book teaches you to build your own agent systems using AWS as infrastructure. That is a different topic from using AWS's packaged AI assistants (Amazon Q and friends), which are products you configure rather than systems you design. We cover the managed building blocks (Bedrock, AgentCore) in depth because you can assemble them into your own architecture; we skip the packaged assistants entirely.
What this book assumes
No agent framework background. No prior AWS depth, though having seen an AWS console helps. Comfortable Python. The machine-learning content is self-contained, but if you want the full foundation, the companion books in this series cover it: AI Foundations in Depth for the modeling spine, and Context Engineering for tokens, caching, and context mechanics, which this book leans on when we price agent fleets.
Costs are treated with respect. Every lab is tagged with a tier: T0 runs locally for free, T1 touches AWS for cents, T2 is a real deployment priced in dollars with an explicit teardown checklist. You can read the whole book and run every T0 lab without an AWS account.
How Part 0 works
What you are reading now is Part 0, the design. It exists so that every later chapter lands in a structure you have already seen:
- The concepts builds the vocabulary from zero: what a model call is, how a loop plus tools becomes an agent, event sourcing, queues, quotas, microVMs, identity, and the open protocols, each explained with a running example before any AWS service enters the picture.
- The map is the full curriculum: eleven parts, each chapter's topics spelled out, so you know exactly where any subject lives.
- Under the hood is the AWS decoder ring: for every service the book uses, what it actually is, what AWS runs beneath it, and the open-source projects (Firecracker, Cedar, OpenTelemetry, MCP, Strands) at the bottom of the stack.
- The production bar defines the twelve gates a system must pass before "production ready" means anything.
- The reference architecture draws Hive's six planes, the life of one task through them, and the build-vs-buy decision tables.
- The use-case gallery maps eight agent systems onto that architecture, with their hard parts and honest notes on when an agent is the wrong tool.
- The lab catalog lists every lab in the book, tiered and priced, plus the sizing math (Little's law meets token quotas) that we use to plan fleets before spending a dollar.
Read Part 0 in order once. After that it becomes a map you return to.
👉 Next up: the concepts, where the vocabulary of the whole book gets built one idea at a time.