Module 02 Amazon Bedrock Essentials - akash-coded/aws-bedrock-agentcore-strands GitHub Wiki
Your first real calls: Converse API, tokens, tool use, knowledge bases, guardrails.
Module 02 of 16 ยท track Invoke ยท Estimated time: 6โ8 hours ยท Prerequisites: Modules 00โ01, and an AWS account with Bedrock model access enabled.
This is where AWS enters properly. One API โ Converse โ carries you from a hello-world call all the way to tool use and retrieval. Learn it well here and every later module gets easier.
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.
The lesson that frames this module is Why Your AI Agent Costs 4ร the Estimate, and How to Fix It (7 min): what a token actually costs once the habits are counted. Then try the bill leak calculator in the workbench: the same decision, with your numbers.
- Invoke any Bedrock model through the Converse API and read the token accounting
- Hold a correct multi-turn conversation, including the assistant tool-use turn
- Define a tool schema the model actually calls correctly
- Query a Bedrock Knowledge Base and ground an answer in retrieved context
- Apply a Guardrail and observe what it blocks
| Portable GenAI concepts | AWS-specific surface |
|---|---|
| Prompting | Amazon Bedrock Converse API |
| Multi-turn state | InvokeModel |
| Tool/function calling | Bedrock Knowledge Bases |
| Retrieval grounding | Bedrock Guardrails |
| Safety filtering | IAM for Bedrock |
Portable concepts transfer to any stack. The AWS column is where this module touches the cloud โ see docs/concepts/portability-matrix.md.
| # | Step | What it is | |
|---|---|---|---|
| 1 | ๐ | slides/Bedrock_Chapters_1_to_4.pptx |
Chapters 1โ4: access, models, first calls, tokens |
| 2 | ๐ป | notebooks/00_Bedrock_Onboarding.ipynb |
Onboarding notebook โ verify your access works |
| 3 | โ๏ธ | exercises/Exercise_1_First_Calls_and_the_Converse_API.pdf |
Exercise 1 ยท first calls |
| 4 | ๐ป | notebooks/converse_api_masterclass.ipynb |
Converse API masterclass |
| 5 | โ๏ธ | exercises/Exercise_2_Tokens_and_Multi-Turn_Conversations.pdf |
Exercise 2 ยท tokens and multi-turn |
| 6 | ๐ | slides/Bedrock_Chapters_5_to_8.pptx |
Chapters 5โ8: tool use, RAG, guardrails, agents |
| 7 | ๐ป | notebooks/travelmind_refund_agent.ipynb |
TravelMind refund agent โ tool use in anger |
| 8 | โ๏ธ | exercises/Exercise_3_Tool_Use_and_Knowledge_Bases.pdf |
Exercise 3 ยท tool use and KBs |
| 9 | โ๏ธ | exercises/Exercise_4_Guardrails_Strands_and_End-to-End_Agent_Design.pdf |
Exercise 4 ยท guardrails and end-to-end design |
| 10 | ๐ป | notebooks/Day5_Bedrock_Build.ipynb |
Build session โ put it together |
๐ 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.
projects/bedrock-mini-project โ a self-contained build with scripts, KB documents and a cost analysis.
- Using
bedrockwhen you needbedrock-runtime. Different clients, different operations. - Dropping the assistant's tool-use message from history. The next turn then makes no sense to the model.
- Assuming model access is on by default. It is per-model, per-region, and must be requested.
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.
Frameworks
- Token Tax Ledger โ Four of six taxes are charged on every turn
- Grounding Triangle โ Retrieved โ cited โ verified
- Tool Surface Audit โ Six axes per tool โ the schema is what the model sees
Quick reference
- Bedrock Converse API โ Clients, message shape, and the tool-use round trip
- Prompting for agents โ The three prompts in an agent
Recipes and procedures
- Add a tool properly โ 30-minute recipe for a tool the model calls correctly
โ Module 01 ยท LLM Intuition and the AWS Bridge ยท All modules ยท Module 03 ยท Amazon Bedrock Agents โ
โ๏ธ This page is generated from modules/02-bedrock-essentials/README.md. To change it, edit the module README: an edit made here is replaced at the next sync.