Skip to content
AgenticAIWiki
  1. Learn
  2. Part 9
  3. 51. Agent frameworks compared
  4. 51.6

Lesson 51.6 · 6 of 6 · 4 min read · Reviewed 24 Nov 2026

Choosing for your team

By the end, you can

  • Choose an agent framework for a team.
  • Avoid lock-in.

A quick guide

If you need Consider
An agent that works with files, code and commands, with permissions and hooks Claude Agent SDK (51.2)
Explicit control flow, checkpoints, human approval steps A graph framework (51.3)
A quick multi-role prototype A conversation-style framework (51.4)
A small agent with full visibility A plain loop (51.5)

Questions for the team

  1. What do we already know? (Python or TypeScript, existing tooling.)
  2. How will we traceTrace: A record of everything that happened during one request or agent run, as a tree of timed steps. and evaluate it? (Chapters 19 and 67.)
  3. Does it support the model features we rely on?
  4. Who maintains it, and how often does it change?
  5. How would we leave?

Keep the core portable

your code:   tools, business rules, prompts, evals, data access
framework:   loop, orchestration, state plumbing

Tools exposed as MCPModel Context Protocol (MCP): An open protocol that standardises how AI applications connect to tools, data and prompts through servers. servers (chapter 35) work across many frameworks and clients, which makes switching easier.

Pilot, then commit

Build the same small task in two candidates, run your eval set, compare quality, cost, latencyLatency: The time from sending a request until you get the response, or until the first token arrives when streaming. and how easy each was to debug.

Key points

  • Choose by the job: file and code agents, explicit graphs with checkpoints, role-based prototypes, or a plain loop.
  • Weigh your team's skills, observability needs, model features and how hard it would be to leave.
  • Keep business logic and tools in your own code, so they move with you.
  • Pilot with your eval set before committing.
Hands-on labRuns in the Playground

Score frameworks for your team

Turn your team's needs into weights, rank the options and choose two to pilot.

You will have: A weighted scoring script and a one-line pilot plan.

Steps

  1. Run the starter: with zero weights every option scores the same.
  2. Set the weights for a team that needs approval steps, full visibility and an easy exit.
  3. Print the ranking and the two options to pilot.
  4. Change the weights for a coding-agent team and see the ranking shift.
  5. Write down which parts of your code (tools, rules, prompts, evals) must stay outside any framework.

Done when

  • The solution's ranking puts Graph framework and Plain loop at the top.
  • It prints a pilot line naming two options.
  • A coding-heavy weighting moves Agent SDK up.

Open in the Playground No API key needed.

Starter code (Python)
# Weigh framework options for your team, then pick two to pilot on your eval set.
OPTIONS = ["Agent SDK", "Graph framework", "Conversation-style", "Plain loop"]
FIT = {   # illustrative fit scores, 0 to 5, for each option above
    "files and code": [5, 2, 2, 2],
    "explicit flow and approvals": [2, 5, 1, 2],
    "quick multi-role prototype": [3, 2, 5, 3],
    "full visibility": [3, 3, 2, 5],
    "easy to leave": [3, 3, 2, 5],
}
# TODO: set how much each need matters to your team (0 to 5)
WEIGHTS = {"files and code": 0, "explicit flow and approvals": 0, "quick multi-role prototype": 0,
           "full visibility": 0, "easy to leave": 0}


def scores(weights):
    total = sum(weights.values()) or 1
    return {opt: sum(weights[k] * FIT[k][i] for k in FIT) / total for i, opt in enumerate(OPTIONS)}


s = scores(WEIGHTS)
for opt, v in sorted(s.items(), key=lambda kv: -kv[1]):
    print(f"{opt:20} {v:.2f}")
# TODO: print "pilot: <top option> vs <second option> on the eval set"
Show a solution
# Weigh framework options for your team, then pick two to pilot on your eval set.
OPTIONS = ["Agent SDK", "Graph framework", "Conversation-style", "Plain loop"]
FIT = {   # illustrative fit scores, 0 to 5, for each option above
    "files and code": [5, 2, 2, 2],
    "explicit flow and approvals": [2, 5, 1, 2],
    "quick multi-role prototype": [3, 2, 5, 3],
    "full visibility": [3, 3, 2, 5],
    "easy to leave": [3, 3, 2, 5],
}
# TODO: set how much each need matters to your team (0 to 5)
WEIGHTS = {"files and code": 1, "explicit flow and approvals": 5, "quick multi-role prototype": 0,
           "full visibility": 4, "easy to leave": 3}


def scores(weights):
    total = sum(weights.values()) or 1
    return {opt: sum(weights[k] * FIT[k][i] for k in FIT) / total for i, opt in enumerate(OPTIONS)}


s = scores(WEIGHTS)
for opt, v in sorted(s.items(), key=lambda kv: -kv[1]):
    print(f"{opt:20} {v:.2f}")
top = sorted(s, key=lambda o: -s[o])[:2]
print(f"pilot: {top[0]} vs {top[1]} on the eval set")
Quick checkHow can a team reduce lock-in to an agent framework?
How sure are you?
Pick an answer and how sure you are

Finished the chapter? Take the chapter check.