Skip to content

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 whenAdopt a framework when
You want full control over every stepYou want the boilerplate gone
You want minimal dependenciesYou 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.

  • 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.
CategoryBuilt forExample(s)
Orchestration / multi-agentCoordinating several cooperating agentsMicrosoft Agent Framework (successor to AutoGen, which is in maintenance mode)
Retrieval-firstAnswering from your own documents; retrieval as a primitiveLlamaIndex
Graph / state-machineExplicit, inspectable control flow (branches, loops you define)LangGraph
Managed serviceHosted runtime that runs and scales the agent for youMicrosoft Foundry Agent Service (formerly Azure AI Agent Service)

Each row says what the framework is built for, not which is best.

"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.

  • 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.”

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.

  • 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.