Every week brings a new agent framework and a blog post declaring the previous one obsolete. Meanwhile the interview question stays the same: "which would you use, and why?" The good news is that the answer doesn't depend on this month's release — it depends on four properties of your problem. This is a deliberately short lesson: the map, the decision criteria, and the honest note that none of them fixes the things that actually break.
The map
| Option | Core abstraction | Sweet spot |
|---|---|---|
| Raw loop | a while-loop you wrote | few tools, bounded run, full control, learning |
| LangChain | composable components + integrations | plumbing: loaders, retrievers, parsers, model swapping |
| LangGraph | graph of nodes with shared state | production agents needing persistence, approvals, branching |
| CrewAI | roles, tasks, crews | role-based multi-agent teams, expressed quickly |
| AutoGen | conversational agents that message each other | research-flavoured multi-agent and code-execution setups |
| Provider agent SDKs | hosted loop + tools from one vendor | fastest path if you're committed to that provider |
The raw loop — still a legitimate answer
Twenty to thirty lines gets you a working agent: call the model with tool schemas, execute requested tools, append results, repeat, stop at a step limit. No dependencies, complete visibility into the prompt, and nothing between you and the API when something breaks.
Write it once before you adopt a framework. It's the difference between using LangGraph because it solves a problem you have and using it because you don't know what it's doing — and interviewers can tell which one you are within two questions.
LangGraph — for when production asks hard questions
Everything in lesson 5: explicit graph control flow, typed shared state, checkpoints for persistence and recovery, interrupts for human approval, streaming of intermediate steps, and clean tracing. It earns its complexity the moment your requirements include the words approval, resume, audit or branch.
CrewAI, AutoGen and provider SDKs
CrewAI makes multi-agent teams fast to express: define agents by role, goal and backstory, assign tasks, and let the framework coordinate. Excellent for getting a research→write→review crew running in an afternoon; less fine-grained control over routing than an explicit graph.
AutoGen models agents as conversational participants that message each other, with strong support for code execution — it came out of a research context and suits experimentation and multi-agent conversation patterns.
Provider agent SDKs (from the model vendors) offer a hosted loop with built-in tools. Fastest path to something working if you're already committed to that provider; the trade is portability.
Where MCP fits — a different layer entirely
A common interview confusion worth clearing up. Frameworks orchestrate — they run the loop, hold state, route between agents. MCP (Model Context Protocol) standardizes how tools and data sources are exposed and discovered, so any MCP-capable client can use any MCP server.
Without a standard, five AI apps × ten internal systems = fifty bespoke integrations. With MCP: ten servers, any client. MCP doesn't replace tool calling or frameworks — it replaces custom integration work, and frameworks increasingly consume MCP servers directly (the MCP course).
How to choose — four questions
1 · How complex is the control flow? One loop, two tools → raw loop. Branches, cycles, parallel paths → graph. 2 · Do you need persistence? If a run must survive a restart, pause for approval, or continue across sessions → checkpointing framework. 3 · Multi-agent? Role-based teams → CrewAI; fine-grained routing → LangGraph. 4 · How expensive is leaving? Keep tools as plain functions and prompts as plain strings, so the framework wraps your logic instead of absorbing it.
💡 Tip: if an interviewer asks "which framework?", don't name one — ask about control flow, persistence and approvals first, then choose. The reasoning is the answer; the product name is a detail that will be outdated by next year anyway.
Wait — will a framework fix my agent's bad behaviour?
No, and this is the answer interviewers wait for. Frameworks organize execution. They do not fix: hallucination (still needs grounding and verification), bad tool design (vague descriptions still cause wrong calls), prompt quality, context bloat, safety (limits still belong in tool code), or evaluation (you still need a test set and traces).
Frameworks are operational leverage, not correctness guarantees. Teams that adopt one expecting quality improvements are disappointed; teams that adopt one for state, approvals and tracing are not.
Common mistakes
- Choosing by popularity rather than by control-flow and persistence needs.
- Adopting a framework before ever writing the raw loop.
- Expecting the framework to improve answer quality.
- Coupling business logic to framework abstractions, making migration expensive.
- Confusing MCP with a framework — different layers entirely.
- Memorizing API surfaces instead of the trade-offs; APIs change every few months.
Quick recap
| Question | Answer |
|---|---|
| Simple agent, few tools? | raw loop — and write it once regardless |
| Need approvals, resume, branching? | LangGraph |
| Role-based team, built fast? | CrewAI |
| Conversational multi-agent / code execution? | AutoGen |
| Committed to one provider? | their agent SDK — at the cost of portability |
| Connecting to many tools/systems? | MCP — a protocol, not a framework |
| What none of them fix | hallucination, tool design, prompts, safety, evaluation |
Practice Zone — PYQs from real selection rounds
Six MCQs and a scenario task — pick the stack for three very different projects and justify each.
The clearest difference between LangChain and LangGraph is:
Asked in

CrewAI's distinguishing idea is:
Asked in

When is writing your own agent loop (no framework) the right call?
Asked in

What should drive framework choice in a real project?
Asked in

Which capability do agent frameworks NOT give you?
Asked in

How does MCP relate to agent frameworks?
Asked in

Hands-on task:
Pick an approach (raw loop / LangGraph / CrewAI) with reasoning for: 1) A weekend prototype answering questions with two tools. 2) A production support agent needing approval before refunds and resumability. 3) A content team wanting research→write→edit automation, built by non-specialists.
Asked in

FAQ
Which framework should I put on my resume?
Whichever you've actually built something with — one real project beats three names. LangGraph is the most commonly requested for production roles right now, but the interview will go to what you can explain and debug, not what you list.
Is it bad to use no framework in production?
Not at all, for a simple bounded agent — plenty of teams run a hand-written loop with their own tracing. It becomes painful when you need persistence, approvals and multi-agent routing; at that point you're rebuilding a framework badly.
How do I keep from being locked in?
Keep tools as plain functions, prompts as plain strings, and business rules in your own modules — let the framework wrap your logic rather than absorb it. Then swapping orchestration is a rewrite of the glue, not the system.
Next lesson: proving the thing actually works — Lesson 9: Testing & Observing Agents →


