Choosing a Framework
~3 min read
Concept & How It Works
- Key points are in the visual diagram above.
Learn these elsewhere (not covered in depth here)
- →LangGraph — Phase 10
- →OpenAI Agents — Phase 11
- →Claude Agent SDK — Phase 12
- →CrewAI — Phase 13
Why Does It Exist?
The 2026 landscape is noisy. Interviews and production reviews both ask why this runtime, not a list of logos you installed.
Real-World Analogy
You do not pick a database by GitHub stars. You pick Postgres vs a graph DB by the queries. Same for agents.
Visual Workflows
What is Choosing a Framework?
Example
Scenario
Ticket router with human approval → LangGraph. Five specialists writing a report → CrewAI. Internal Python API with strict JSON → PydanticAI. GPT-only prototype this week → OpenAI Agents SDK.
Solution
In Agent Framework Landscape, apply Choosing a Framework to this scenario: Ticket router with human approval → LangGraph. Identify the inputs, run the technique, validate the output, and note one thing you would monitor in production.
Practice Task
Do this before moving to the next module — reading alone is not enough.
Open the Code Walkthrough below and run it locally. Change one parameter related to Choosing a Framework (e.g. model, temperature, top_k, or tool name), observe the difference in output, and write 2–3 sentences explaining what changed.
Code Walkthrough
Highlighted lines show where Choosing a Framework happens in the code.
1def pick_framework(needs): # define a reusable function2 if needs["hitl"] or needs["checkpoints"] or needs["branching"]:3 return "langgraph" # return the result4 if needs["roles"] and needs["team"]:5 return "crewai" # return the result6 if needs["typed_python"] and needs["structured_out"]:7 return "pydantic-ai" # return the result8 if needs["openai_only"] and needs["handoffs"]:9 return "openai-agents" # return the result10 if needs["coding_agent"] or needs["claude_code"]:11 return "claude-agent-sdk" # return the result12 if needs["microsoft_stack"]:13 return "microsoft-agent-framework" # return the result14 if needs["gemini_native"]:15 return "google-adk" # return the result16 return "raw loop is still allowed" # return the resultCommands to Remember
Commands to Remember
Graph + HITL → LangGraphRoles + tasks → CrewAITyped tools → PydanticAIVendor lock-in is a choice
Common Mistakes
- Running two orchestrators in one service
- Picking a framework before writing the state machine on paper
Cheat Sheet
Quick recap — the most important points from this module.
Cheat Sheet
quick ref- •Match shape of work
- •HITL → graph runtime
- •Teams → CrewAI / Microsoft AF
- •One runtime in production
