Lesson 11 Choosing the Right Framework
Theme:
Lesson 11 · Slide 1

Lesson 11 — Choosing the Right Framework

One scorecard, four sweet-spot agents, real numbers.

Agents Module 6 Scorecard Cross-Framework

Lesson 11 · Slide 2

Where we are

Lesson 11 · Slide 3

The four agents (recap)

LessonFrameworkSweet spotLoC (approx)
L04Claude Agent SDKTool-heavy research assistant~120
L06LangGraphGraph-shaped pipeline~150
L08OpenAI Agents SDKTriage + handoff~140
L10CrewAIMulti-agent crew~170

Each agent was built at the shape its framework was designed for — no contortions.

Lesson 11 · Slide 4

The scorecard

Seven dimensions

  • Cost per task (USD) — total LLM spend per task, averaged across the harness's question set.
  • Median latency (s) — wall-clock per task, median across runs.
  • Lines of code (LoC) — cloc on the agent.py file (excludes mocked data dicts).
  • Built-in observability — what you get for free (steps, traces, events) vs. what you wire yourself.
  • Eval surface area — how easy is it to hook in eval / replay / regression testing.
  • Vendor lock-in — how much of your code couples to one vendor's API/model.
  • Failure-recovery primitives — retries, timeouts, fallbacks, prompt-injection defences.
Lesson 11 · Slide 5

Why these seven (not five, not nine)

Lesson 11 · Slide 6

The eval harness

agents/_eval/
  __init__.py
  scorecard.py       # ScorecardRow dataclass + render helpers
  run_all.py         # main runner: imports all 4 agents, measures, emits JSON+MD
  results.json       # generated artefact (gitignored)
  results.md         # generated artefact (gitignored)
  mcp_stub/          # used by L12's sidebar, not L11

The lab walks you through running it — one command, one minute, your own numbers.

Lesson 11 · Slide 7

What the harness measures (live)

Lesson 11 · Slide 8

What the harness scores (rubric)

Lesson 11 · Slide 9

A real scorecard (2026 Q2 snapshot)

DimensionClaude SDKLangGraphOpenAI SDKCrewAI
Cost/task (USD)0.0340.0410.0290.062
Median latency (s)18241631
Lines of code120153138168
Observability (0–3)2321
Eval surface (0–3)2322
Vendor lock-in (0–3, higher = more portable)1213
Failure-recovery (0–3)2321

Example numbers — the lab produces the real ones for your machine and model choices.

Lesson 11 · Slide 10

What jumps out

Lesson 11 · Slide 11

What the numbers DON'T tell you

Three things the scorecard can't see

  • How the team feels writing the code. Some engineers love drawn graphs (LangGraph); others love decorators (Claude SDK).
  • The cost of changing the agent. A LangGraph DAG is easy to modify if you already think in DAGs; otherwise it's overhead.
  • The blast radius of vendor decisions. “Lock-in 1” might be fine if you're already deep in that vendor's ecosystem.
Lesson 11 · Slide 12

Decision matrix

  • Tool-heavy + Claude is fine → Claude Agent SDK.
  • Pipeline / DAG shape → LangGraph.
  • Multi-provider model routing or triage / handoff → OpenAI Agents SDK.
  • Role-play / committee shape → CrewAI.
  • Unknown → start with Claude SDK; rewrite if a specific need surfaces.
Lesson 11 · Slide 13

What the harness CAN'T be replaced by

Lesson 11 · Slide 14

Recap & what's next

Coming up: Lesson 12 — cost / latency / evals across frameworks, plus an MCP-bridge sidebar.
1 / ?