Skip to content
47% off: the complete course for $79 (reg. $149)Order now →
Agent Builder
Module 6Full course11 min read

Choosing an Agent Framework

A practical comparison of the major options — provider agent SDKs, LangGraph, LlamaIndex, CrewAI, and writing your own — and how to choose.

By now you've built an agent loop, tools, an orchestrator, subagents, parallel workers, critic loops, ensembles, handoffs, and an A2A endpoint, all in plain TypeScript. That's deliberate: you now understand what every agent framework does underneath. It also raises the obvious question: should your next project use a framework, and if so, which?

There's no universal winner. This lesson gives you a fair map of the major options as they stand in late 2026: the provider SDKs from Anthropic and OpenAI, LangGraph, LlamaIndex, CrewAI, Google's ADK, Microsoft Agent Framework, and Hugging Face's smolagents, plus the option of writing your own. You'll learn what each is genuinely good at, the hidden costs of any framework, and a short bake-off process for choosing with evidence instead of hype.

What a framework actually gives you

Every agent framework packages some of the same pieces you've already built by hand:

PieceWhere you built it
The agent loop and stop conditionsA Minimal Agent Loop, Error Handling
Tool definitions, validation, and errorsAdding Real Tools, Validating Tool Inputs
Streaming and eventsStreaming and UX
Memory and persistenceAdding Memory
Cost tracking and budgetsPrompt Caching and Cost Tracking
Multi-agent orchestrationThis module
Tracing and evalsTracing and Observability

Frameworks differ in which of these they emphasize and how much they decide for you. They fall into four families:

  1. Provider agent SDKs (Claude Agent SDK, OpenAI Agents SDK). Built by model companies, tuned for their own models, focused on making one capable agent easy.
  2. Orchestration frameworks (LangGraph, Microsoft Agent Framework, Google ADK). Explicit control flow across many steps and agents, with state and human approval built in.
  3. Role-based team frameworks (CrewAI). You describe agents as roles with goals and assign them tasks; the framework coordinates them.
  4. Specialists (LlamaIndex for documents and data, smolagents for agents that act by writing code).