← chapter

Capstone: an end-to-end app

Chapter 22 · the whole course, composed

The hour

The whole app is one function

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).

The decomposition IS the skill

"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.

Put it to work — three products

Three products, zero new concepts.

Keep it as simple as the problem allows

The best apps have the least machinery that works.

Patterns, not a provider

Ports to Gemini with only the calls changing.

New provider? New model next month? Your architecture survives.

Takeaway

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.