Chapter 22 · the whole course, composed
def assist(message):
if flagged(message): return "[blocked]"
# agent loop over grounded tools
# search_kb — policy questions
# order_status — order questions
# answer ONLY from tool results
return answer
Moderation (wk16) + agent (wk18) + grounding (wk7-9).
"Build an AI support bot" felt intimidating.
Now it's moving parts you've each built alone: retrieve · ground · call tools · loop · moderate.
Seeing a product as known pieces is the job.
Three products, zero new concepts.
The best apps have the least machinery that works.
Ports to Gemini with only the calls changing.
New provider? New model next month? Your architecture survives.
A real app is composition, not invention. See the requirement, pick the known piece, assemble with production habits. You started with one API call. Now build the thing it was leading to. Go build it.