Module 05 The Agent Loop No Framework to Strands - akash-coded/aws-bedrock-agentcore-strands GitHub Wiki

๐Ÿ” Module 05 ยท The Agent Loop: No Framework to Strands

Write the loop by hand, feel the pain, then let Strands remove it.

Module 05 of 16 ยท track Build ยท Estimated time: 5โ€“6 hours ยท Prerequisites: Module 02. Module 03 helps but is not required.

The best way to understand a framework is to build what it replaces. You will write a working agent loop in plain Python, hit every sharp edge, and only then meet Strands โ€” at which point every abstraction it offers will be obvious rather than magical.

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 P2 Build & Prove: How to Build an AI Agent in Proven Slices (8 min): building in proven slices, which is what the loop makes possible. Then try the sprint-to-bolt planner in the workbench: the same decision, with your numbers.

What you will be able to do

  • Write a complete agent loop with no framework at all
  • Explain exactly what a framework abstracts away, and what it costs you
  • Build the same agent in Strands in a fraction of the code
  • Choose deliberately between hand-rolled and framework code

Concepts in this module

Portable GenAI concepts AWS-specific surface
Agent loop mechanics Bedrock Converse API
Tool dispatch Strands on Bedrock
State management AgentCore preview
Framework trade-offs

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/Day6_Deck1_Agent_Loop.pptx The agent loop, from first principles
2 ๐Ÿ’ป notebooks/Day6_Demo_0_Foundations.ipynb Foundations
3 ๐Ÿ’ป notebooks/Day6_Demo_1_NoStrands.ipynb The hand-built loop โ€” no framework
4 โœ๏ธ exercises/Day6_Exercise.ipynb Exercise: extend the hand-built loop
5 ๐Ÿ“– slides/Day6_Deck2_Strands_AgentCore.pptx Strands and AgentCore
6 ๐Ÿ’ป notebooks/Day6_Demo_2_Strands.ipynb The same agent in Strands
7 ๐Ÿ’ป notebooks/Day6_Demo_2b_Strands_Advanced.ipynb Strands, further
8 โœ๏ธ exercises/Day6_Exercise_2b.ipynb Exercise 2b
9 ๐Ÿ’ป notebooks/Day6_Demo_3_AgentCore.ipynb First look at AgentCore
10 โœ๏ธ exercises/Day6_Capstone_TravelMind_Desk.ipynb Capstone: TravelMind desk

๐Ÿ“– 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

  • Reaching for a framework before you can write the loop. You will not be able to debug it.
  • Assuming Strands hides Bedrock. It does not โ€” model IDs and access still apply.

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 04 ยท Agent Builder, Knowledge Bases and Guardrails ยท All modules ยท Module 06 ยท Strands Foundations: Tools, Memory and MCP โ†’

โœ๏ธ This page is generated from modules/05-agent-loop-no-framework-to-strands/README.md. To change it, edit the module README: an edit made here is replaced at the next sync.

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