Lesson 5 / 25

What Frameworks Give You

List the recurring problems frameworks solve and the costs they bring.

Plumbing and patterns

Frameworks typically provide the loop, tool registration, streaming, retries, state persistence, human-approval steps, tracing and multi-agent handoffs. The cost is another abstraction to learn, version churn, and harder debugging when something goes wrong inside the framework.

Build, borrow or buy

Frameworks save work on plumbing but add abstraction. Choose by what your project actually needs.

Three options: raw API, a framework, a managed agent.
Figure 2.1 — Raw API, framework, managed agent.

Cooking from scratch vs a meal kit

A meal kit saves chopping time and works well for common recipes. For an unusual dish you may find the kit gets in the way and cook from scratch.

Read the source once

Whatever framework you pick, read how its core loop and prompt assembly work. Knowing what it sends to the model makes debugging far easier.

Quick check: Which is a typical cost of adopting a framework?

  • It makes tool calling impossible
  • Extra abstraction and faster-changing APIs to keep up with
  • It forbids Python
  • It removes the need for tests
Answer

Extra abstraction and faster-changing APIs to keep up with — Abstractions help but must be learned, and fast-moving libraries need upkeep.