Module 03 Amazon Bedrock Agents - akash-coded/aws-bedrock-agentcore-strands GitHub Wiki

๐Ÿค– Module 03 ยท Amazon Bedrock Agents

Console to code: action groups, orchestration, and controlling behaviour.

Module 03 of 16 ยท track Invoke ยท Estimated time: 6โ€“7 hours ยท Prerequisites: Module 02.

Bedrock Agents give you a managed agent loop. You will build one in the console, then rebuild it in code so you understand what the console was doing for you โ€” and then hand-build the loop yourself so nothing is magic.

Open the module on GitHub โ†—: the slides, notebooks, exercises and solutions are there. This page is the reading order, with the tutorial and the workbench alongside.

Read first, on the site

The lesson that frames this module is P1 Design & Spec: Write a Spec an AI Agent Can Build From (8 min): what a spec an agent can build looks like, before the console. Then try the autonomy decision record in the workbench: the same decision, with your numbers.

What you will be able to do

  • Create a Bedrock Agent in the console and invoke it from Python
  • Define action groups backed by Lambda and a correct OpenAPI schema
  • Trace an agent's reasoning and debug a failed orchestration
  • Control verbosity, latency and cost through instructions and configuration
  • Hand-build the agent loop so the managed one holds no mystery

Concepts in this module

Portable GenAI concepts AWS-specific surface
Agent loop Bedrock Agents
Tool routing Action groups
ReAct-style orchestration AWS Lambda
Prompt-driven behaviour control OpenAPI schemas
Agent tracing
CloudWatch

Portable concepts transfer to any stack. The AWS column is where this module touches the cloud โ€” see docs/concepts/portability-matrix.md.

Run it in this order

# Step What it is
1 ๐Ÿ“– slides/Day8_Deck1_Console_to_Code.pptx Console to code
2 ๐Ÿ’ป notebooks/00_connect_to_agent.ipynb Connect to your agent
3 ๐Ÿ’ป notebooks/01_setup_invoke_trace.ipynb Setup, invoke, and read the trace
4 ๐Ÿ’ป notebooks/02_handbuilt_loop.ipynb Hand-build the loop โ€” the demystifier
5 ๐Ÿ’ป notebooks/03_action_groups.ipynb Action groups with Lambda
6 โœ๏ธ exercises/Day8_Guided_Practice_Agent_Loops_and_Action_Groups.md Guided practice
7 ๐Ÿ“– slides/Day8_Deck2_Controlling_Behavior.pptx Controlling behaviour
8 ๐Ÿ’ป notebooks/04_controlling_behavior.ipynb Behaviour control in practice
9 โœ๏ธ exercises/verbosity_tax_exercise.md The verbosity tax โ€” cost of chatty agents
10 ๐Ÿ’ป notebooks/05_production_and_insights.ipynb Production patterns and insights
11 โœ๏ธ exercises/disruption_desk_exercise.md Disruption desk โ€” the full scenario

๐Ÿ“– read   ๐Ÿ’ป run   โœ๏ธ practise   ๐Ÿ“Š workbook   ๐Ÿ”– reference

Worked solutions live in solutions/. Attempt every exercise closed-book first โ€” the solutions are written to be read after you have a wrong answer to compare against.

Common mistakes

  • An OpenAPI schema the model cannot read. Vague descriptions produce wrong tool calls.
  • Forgetting Lambda resource-based permissions for the agent to invoke it.
  • Treating verbosity as free. Every extra sentence is tokens on every turn.

When it breaks

Every error anyone has hit in this course is in the Error Index, by the exact string. Model access and region problems are in Model and Region Notes. If it is a question rather than an error, check the answered ones first, then ask in Q&A.

Field guide for this module

Frameworks

Quick reference

Recipes and procedures


โ† Module 02 ยท Amazon Bedrock Essentials ยท All modules ยท Module 04 ยท Agent Builder, Knowledge Bases and Guardrails โ†’

โœ๏ธ This page is generated from modules/03-bedrock-agents/README.md. To change it, edit the module README: an edit made here is replaced at the next sync.

โš ๏ธ **GitHub.com Fallback** โš ๏ธ