You do not need a framework survey. You need to say, in one sentence per option, what it buys and what it costs. And you need to defend choosing none of them, in front of someone who has already picked one.
Ask someone which framework they use and you learn very little. Ask what is this framework load-bearing for — which part of the system would fall over without it — and you learn almost everything. That second question is what separates a good answer from a merely fluent one.
If the answer is “the loop”, you could have written that yourself. The previous lesson has it in about forty lines. If the answer is “a human approves a step and the process may span a restart”, that is a real capability, and you should pay for it.
So framework choice is a reversibility decision, not a technology preference. How hard would it be to leave?
Everything below was checked at the source while this page was written. Framework claims rot faster than anything else in this curriculum: two of the facts in the trap section were true in a different form a year ago.
Not which framework — whether. Read the verdict row left to right: it escalates from “write it” to a capability nothing on the table actually sells you. Select any column for the full version, hedges included.
One column is a real purchase. One is a seam to defend. The column on the right is the one people believe they bought and did not.
Select the capabilities you actually need. The useful discovery is usually not which option wins. It is how often the honest answer is that nothing on the table clears the bar.
Select the capabilities you actually require. The table re-sorts, and each option explains itself against your selection rather than in general. Selecting nothing is also an answer.
For this set, LangGraph is the strongest fit at 2 of 2. Read its cost line before you take that as advice — the score measures coverage, not whether the coverage is worth what it charges you.
A typed StateGraph with reducers, plus checkpointers that persist graph state per thread and stores that persist across threads.
This is the one thing on the table that is genuinely hard to write yourself. interrupt() can be called inside node code, persists state and waits indefinitely; you resume with Command(resume=value) from a different process hours later.
What it costs · A graph abstraction you now debug through, and a persistence model whose guarantees are narrower than the word “checkpoint” suggests.
Claude Code as a library in Python and TypeScript: the same agent loop, tools, context management, permissions, hooks, subagents and MCP support.
Permissions gate tool execution and sessions can be resumed or forked, but this is approval inside a session rather than a durable interrupt across restarts.
What it costs · Claude-only, and it is a harness rather than an orchestrator — no graph, no shared typed state across steps.
The direct successor to both AutoGen and Semantic Kernel, by the same teams, in .NET, Python and Go — agents, graph-based workflows, middleware, telemetry.
It advertises state management for long-running and human-in-the-loop scenarios, but the interrupt-and-resume story is less battle-tested in public than LangGraph's.
What it costs · Azure-shaped defaults, and Microsoft's second framework consolidation in three years. Go is still public preview.
Roughly eighty lines around the API: a loop, a tool dispatch table, an iteration cap, a repeat detector.
You can persist a run and wait, but resuming correctly across deploys, retries and partial side effects is the hard part, and it is exactly what you would be rebuilding.
What it costs · You write persistence, tracing, parallelism and human gates yourself — each of which is real work when you actually need it.
Flows give deterministic control flow — @start, @listen, @router — over typed Pydantic state; Crews are the autonomous role-based unit that runs inside a step.
Not what it is for. If a person must approve a step and the process may span a restart, this is the wrong tool.
What it costs · Token overhead from role narration, and failure attribution that is genuinely hard: model, prompt or data?
A deliberately small library whose README claims the agent logic fits in about a thousand lines, with first-class support for agents that write actions as Python code rather than JSON.
No persistence layer, no interrupt, no resumption. Not the problem it set out to solve.
What it costs · Small by design, so most of what the others provide is simply absent. The code-agent approach also needs a sandbox you must actually run.
pip install autogen does not install Microsoft’s AutoGen. That name on PyPI belongs to AG2AI, the community fork — version 0.14.1, released 30 June 2026. That package is itself now on security and critical bug fixes only.
Microsoft’s package is autogen-agentchat. Its repository states plainly that “AutoGen is now in maintenance mode. It will not receive new features or enhancements and is community managed going forward”, and points new users at Microsoft Agent Framework instead.
So: two projects, one name, both in maintenance. Any 2026 tutorial telling you to install autogen is teaching a mistake. Knowing that is a currency signal — you cannot infer it, you can only pick it up by having been in the ecosystem this year.
Microsoft Agent Framework is the successor to both AutoGen and Semantic Kernel. Its own documentation calls it “the direct successor, created by the same teams”, in .NET, Python and Go — Go still in public preview. That page also carries the most honest sentence any framework ships with: “If you can write a function to handle the task, do that instead of using an AI agent.”
A run stops to wait for a human approval. Nobody answers until tomorrow, and the service is redeployed twice overnight. The run has to still be sitting there in the morning. That is human-in-the-loop surviving a process restart, and it is what LangGraph does better than anyone.
interrupt() can be called anywhere in node code. It persists state and, in the documentation’s own words, “waits indefinitely until you resume execution”. You resume by invoking the graph again with Command(resume=value), and that value becomes the return value of the interrupt call. It needs a checkpointer and a stable thread id.
This is genuinely hard to build yourself. It is the strongest single reason to reach for the framework.
from langgraph.graph import StateGraph, START, END
from langgraph.types import interrupt, Command
from langgraph.checkpoint.postgres import PostgresSaver
def confirm_escalation(state):
# The node RESTARTS FROM THE TOP when resumed: everything above
# this line runs a second time. Keep side effects below it, or
# make them idempotent. This is the afternoon it costs people.
ok = interrupt({
"question": "Escalate to on-call?",
"zone": state["zone"],
})
if ok:
page_on_call(state["zone"]) # runs once: after the resume
return {"escalated": bool(ok)}
builder = StateGraph(State)
builder.add_node("confirm", confirm_escalation)
builder.add_edge(START, "confirm")
builder.add_edge("confirm", END)
with PostgresSaver.from_conn_string(DB_URL) as saver:
saver.setup() # creates tables; idempotent
graph = builder.compile(checkpointer=saver)
cfg = {"configurable": {"thread_id": incident_id}}
graph.invoke({"zone": zone}, cfg) # pauses here
# ... a different process, hours later, after a deploy ...
graph.invoke(Command(resume=True), cfg)Now be precise about what a checkpointer is not. LangGraph’s persistence layer gives you graph-state snapshots scoped to a thread, plus stores for data shared across threads. Fault tolerance is listed as a use case.
What the documentation does not claim anywhere is automatic retry or exactly-once side effects. The interrupt page puts the idempotency burden explicitly on you.
That is a reasonable design. It is simply not durable execution in the workflow-engine sense, and treating a checkpoint as though it were is how teams discover they have sent two refunds. This distinction is my reading of what the two pages say and do not say; it is worth checking yourself before you repeat it.
CrewAI’s Flows give you deterministic control flow — the same path every time — through @start, @listen and @router. State is declared as a Pydantic BaseModel, with a UUID attached to each state so you can track it across runs.
A Crew is the autonomous, role-based unit that runs inside a Flow step. So: deterministic orchestration on the outside, model judgement on the inside. That maps directly onto the workflow-versus-agent distinction from earlier in this curriculum.
Most tutorials still lead with a bare Crew. That is the demo shape. It produces something impressive in ten minutes, and it leaves you no seam at which to be deterministic about anything.
One honesty note. The CrewAI documentation positions Flows as the coordination layer around Crews. It does not itself declare Flows the production default. That framing is mine, and I think it is right, but do not attribute it to them.
Two credible sources argue for none, and they argue differently. Anthropic — who ship an agent SDK themselves — recommend starting with the API directly. Many patterns are only a few lines of code. And frameworks “often create extra layers of abstraction that can obscure the underlying prompts and responses, making them harder to debug”. That is a debuggability argument.
The 12-Factor Agents argument is sharper, and it is about a ceiling. Teams reach a 70–80% quality bar with a framework. Then they discover that “80% isn’t good enough for most customer-facing features”, and that getting past it “requires reverse-engineering the framework, prompts, flow”. At which point they start over.
Its two load-bearing principles are own your prompts and own your control flow. Note the condition attached, though. If that ceiling is real for your product, adopting a framework early does not save you the work; it defers it and adds a migration.
For proof that the core is small, look at smolagents: its README claims the agent logic fits in about a thousand lines. Small enough to read in a sitting is a genuine production property, not just a teaching one.
The position that holds up in practice is neither “framework” nor “no framework”. It is to choose your tool layer independently of your orchestration layer. Tools written against MCP survive a framework migration. Control flow written into a framework does not. That single decision is what makes the next migration a week rather than a quarter.
As of the 2026-07-28 revision, MCP also has something none of the frameworks here offer: a formal deprecation policy, with a twelve-month minimum window. A tool layer with a published deprecation policy outlives an orchestration layer without one. That is a better reason to prefer the protocol than any feature comparison.
Two of these are deliberate skips at seed. Both are the kind of thing a small team adopts because it looks like maturity. Saying why you have not adopted them is the stronger signal.
Nearly all guidance on this topic is written for one company size and then read by everyone. Pick yours — the list re-sorts, and what you should deliberately not build drops to the bottom.
The sequence of decisions is in code you wrote, thin enough that a new engineer can trace a run end to end.
At this stage · The 12-Factor argument bites here: teams reach a 70–80% quality bar and then find that getting past it means reverse-engineering the framework.
The tool layer speaks a protocol rather than a framework's native tool API, so it survives an orchestration change.
At this stage · Now worth real MCP servers for anything more than one team touches. The protocol has a twelve-month minimum deprecation window, which is longer than most frameworks have offered.
A scheduled exercise that swaps the underlying model — and, once, the orchestration layer — and measures what breaks.
At this stage · Quarterly, on the eval suite. This is where you learn whether the abstraction you adopted is load-bearing or decorative.
LangGraph, CrewAI Flows, MS Agent Framework — an orchestration layer with typed state, edges and a persistence model.
At this stage · Adopt it for the one workflow that needs it — usually the one with a human approval step — and leave everything else on the plain loop. Do not standardise on it yet.
A person can approve a step hours later, after a deploy or a crash, and the run resumes where it paused.
At this stage · A run row in Postgres with a status and a payload survives a redeploy. That is most of the value, and it is a day's work.
Nothing is optional at this stage. That is itself the finding — the cost of the control set is part of the cost of operating here.
Grab built a custom vision LLM for document processing rather than calling an external API, and published the reason as a number. P99 latency on external APIs “can easily be 3 to 4x the P50 latency, which would not be acceptable for Grab’s large scale rollouts”. The cheap adaptation then failed on a specific axis: LoRA struggled with documents in non-Latin scripts such as Thai and Vietnamese. So they moved to full-parameter fine-tuning, which took Thai accuracy up 70 percentage points and Vietnamese up 40.
The engineering lesson transfers straight to framework choice. A build decision is defensible when it names the specific property the bought option cannot provide, measured. “We wanted more control” is not that. “P99 is three to four times P50 and our rollout cannot absorb it” is. Apply the same test to a framework: name the capability it is load-bearing for, and the number or failure mode that made it necessary. If you cannot name either, you are choosing on taste, and you should choose the thin option.
If the answer is “the loop”, you could have written that. If it is “a human approves a step and the process may span a restart”, that is a real capability with a real price. Name the capability before you name the framework.
LangGraph's persistence gives you graph-state snapshots per thread. The docs do not promise automatic retries or exactly-once side effects. interrupt() explicitly re-runs everything above it in the node, so any side effect up there has to be safe to run twice.
pip install autogen gets you AG2AI's fork, not Microsoft's. Microsoft's autogen-agentchat is in maintenance mode and points at Agent Framework. Budget agent scaffolding as a twelve-to-eighteen-month asset, not a foundation.
Tools against MCP, control flow thin and yours. That decision is what makes the next migration a week rather than a quarter — and MCP now carries a twelve-month minimum deprecation window, which no framework here offers.
Primary sources wherever one exists. Where a claim is contested or vendor-reported, the lesson says so at the point it is made.
“Start by using LLM APIs directly: many patterns can be implemented in a few lines of code.” Frameworks “often create extra layers of abstraction that can obscure the underlying prompts and responses, making them harder to debug.” Worth noting who is saying it.
Why the tool layer is the seam worth defending: MCP now has a stateless core, header-based routing and a formal twelve-month minimum deprecation window. A tool layer with a published deprecation policy outlives a framework that does not have one.
Chen, Sahu, Ng and Yang. A build-versus-buy decision made on a measured number rather than a preference — external-API P99 latency “can easily be 3 to 4x the P50” — and a cheap adaptation (LoRA) that failed on a specific axis and had to be replaced with the expensive one.
The README's claim is the useful one: “the logic for agents fits in ~1,000 lines of code”. Also the CodeAgent argument — actions written as Python rather than JSON — with a README-reported 30% fewer steps, which is a vendor claim on their own benchmark.
The sharper version of the argument, and it is about a ceiling rather than about taste: teams “get to 70-80% quality bar”, find that “80% isn't good enough for most customer-facing features”, and then discover that getting past it “requires reverse-engineering the framework”. Factors 2 and 8 are the load-bearing ones.
“AutoGen is now in maintenance mode. It will not receive new features or enhancements and is community managed going forward.” New users are pointed at Microsoft Agent Framework. Installation is autogen-agentchat, never autogen.
The trap, confirmed at the source. The autogen name on PyPI belongs to AG2AI, the community fork, not to Microsoft — and that package is itself now on security and critical bug fixes only. Two different projects, both in maintenance, one name.
interrupt() pauses the graph, persists state and “waits indefinitely until you resume”. It needs a checkpointer and a thread id. Read the warning: the node “restarts from the beginning… so any code before the interrupt runs again”, and side effects before it must be idempotent.
What a checkpointer actually is: graph-state snapshots scoped to a single thread, with stores for data across threads. Fault tolerance is listed as a use case. Automatic retries and exactly-once side effects are not claimed anywhere on the page — which is the point.
Deterministic control flow via @start, @listen and @router, with state as a Pydantic BaseModel and a UUID per state. The docs position Flows as the coordination layer around Crews; they do not themselves declare Flows the production default — that reading is mine.
“The direct successor, created by the same teams” to both Semantic Kernel and AutoGen, in .NET, Python and Go (Go in public preview). Also the most honest sentence any framework ships with: “If you can write a function to handle the task, do that instead of using an AI agent.”
“The same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript.” A harness — built-in file and shell tools, hooks, subagents, permissions, sessions, MCP — rather than an orchestrator with a graph and shared typed state.