Cheatsheet: Choosing an agent framework
The first decision (ask this before “which framework”)
Section titled “The first decision (ask this before “which framework”)”Hand-roll or adopt? Lessons 1 and 2 showed the loop is buildable yourself.
| Hand-roll the loop when | Adopt a framework when |
|---|---|
| You want full control over every step | You want the boilerplate gone |
| You want minimal dependencies | You want opinionated patterns (multi-agent, memory, planning) |
| The loop is small (two or three tools) | You value ecosystem integrations and observability |
Trap: reaching for a framework reflexively. A single-tool agent does not need an orchestration library.
What a framework provides
Section titled “What a framework provides”- Plumbing (the L1/L2 loop): build the tool schema, format and parse tool calls, run tools, feed results back, loop.
- Building blocks (the real reason to adopt): memory, planning, multi-agent coordination, data/service connectors, observability.
The landscape, by category
Section titled “The landscape, by category”| Category | Built for | Example(s) |
|---|---|---|
| Orchestration / multi-agent | Coordinating several cooperating agents | Microsoft Agent Framework (successor to AutoGen, which is in maintenance mode) |
| Retrieval-first | Answering from your own documents; retrieval as a primitive | LlamaIndex |
| Graph / state-machine | Explicit, inspectable control flow (branches, loops you define) | LangGraph |
| Managed service | Hosted runtime that runs and scales the agent for you | Microsoft Foundry Agent Service (formerly Azure AI Agent Service) |
Each row says what the framework is built for, not which is best.
Task to category
Section titled “Task to category”"Answer from our 500-page manual" -> retrieval-first (or hand-roll + 1 tool)"Planner hands work to researcher and writer agents" -> orchestration / multi-agent"Check weather, book a calendar slot" -> hand-roll (2 tools, too small for a framework)The small-task case is the one people get wrong: a framework is overhead, not help, when the task is tiny.
The fit-not-ranking rule
Section titled “The fit-not-ranking rule”- Right framing: “Microsoft Agent Framework is built for multi-agent orchestration; LlamaIndex is built around retrieval.”
- Wrong framing: “Microsoft Agent Framework is better than LlamaIndex.”
There is no best framework, only best-for-a-job. Replace “which is best” with “which is built for what I am doing.”
A caveat to carry
Section titled “A caveat to carry”The loop (L1 + L2) is stable; the libraries move fast. Understand the loop so any framework is a tool you can see through, not magic you are captive to. A breaking API change should be an inconvenience, not a rewrite of your mental model.
Words to use precisely
Section titled “Words to use precisely”- Hand-roll: write the agent loop yourself in plain code, no agent framework.
- Framework: a library that provides the loop plumbing plus building blocks (memory, planning, multi-agent, connectors).
- Managed agent service: a hosted service that runs the agent for you, rather than a library you run yourself.
- Fit, not ranking: choose by matching a framework’s purpose to your task, never by a “which is better” leaderboard.