Skip to content
mentoor

Topic 2 of 5 · 5 min read

Comparing the main agent SDKs

Goal: Match each of four agent frameworks to the project it fits best from a description of their core abstractions and limits.

Each major agent SDK is built around one central idea, and the best match is the one whose idea fits your project. Compare them by core abstraction, model support, state and tracing, then check the current docs, because all of them change quickly.

Check yourself · 1 of 3

Which framework is built around describing a workflow as a graph with checkpointed state?

Choose one answer

The five at a glance

  • Claude Agent SDK (Anthropic). It exposes the same agent loop and built-in tools that power Claude Code: reading and editing files, running shell commands, searching. It adds sessions, hooks, permissions, subagents and MCP servers. Best for agents that work on files and code or need a ready-made computer-like toolset. It is built around Claude models.
  • OpenAI Agents SDK. A small set of ideas: an agent (instructions plus tools), handoffs to other agents, guardrails on input and output, sessions, and built-in tracing. Best for multi-agent workflows with clear handoffs. It is built for OpenAI models and can use others through adapters.
  • LangGraph (LangChain). You describe the workflow as a graph of nodes and edges with shared state. It has checkpointing, so runs can pause, resume and wait for a human. Best for long, branching, auditable workflows where you want explicit control of the path. It is model-agnostic.
  • smolagents (Hugging Face). A deliberately small library. Its signature idea is the code agent: the model writes a Python snippet as its action instead of a JSON tool call. It supports many model back ends, including local and open-weight ones. Best for experiments and open models. Running model-written code needs a sandbox.
  • Google ADK (Agent Development Kit). Agents composed into workflows, with sequential, parallel and loop agents, plus sessions, evaluation tools and a path to Google's cloud. Best when you build on Gemini or Google Cloud, though it is designed to work with other models too.

How to compare for your project

  1. Core abstraction. Loop with tools, handoffs, graph, code actions, or workflow agents?
  2. Model support. Does it work well with the model you actually run? Check how first-class the support is, not whether an adapter exists.
  3. State. In-memory sessions, or checkpoints that survive a crash?
  4. Tracing. Is there a built-in viewer, and can you export to your own tools?
  5. Maturity and churn. How often did the API break in the last year?

Before and after

Weak: "LangGraph is the most popular, so we use it for our code-review agent." The agent reads a repo and edits files, which needs file and shell tools that LangGraph does not ship, so the team writes them all.

Better: "The task is file and code work with Claude, so we start with the Claude Agent SDK, whose built-in tools cover it." The abstraction matches the job.

What goes wrong

  • Choosing by popularity or stars instead of by the abstraction.
  • Trusting a feature table from a blog post that is a year old.
  • Assuming "supports any model" means equal quality. Tool-calling behaviour differs by model, and adapters lag.
  • Ignoring safety needs. Code agents and shell tools need a sandbox and permission rules whichever framework you pick.

Examples

Matching four projects

A coding assistant that edits a repo and runs tests: Claude Agent SDK, for its file and shell tools.

A triage system where a front agent passes billing questions to a billing agent: OpenAI Agents SDK, for handoffs.

A loan-review flow that pauses for human sign-off and must resume days later: LangGraph, for checkpoints.

A weekend experiment with an open-weight model on a laptop: smolagents, for its small size and model flexibility.

Reading the claim "model-agnostic"

A framework says it supports any model. Your team runs a smaller open-weight model and finds that it often returns malformed tool arguments. The adapter works, but the quality does not match the model the framework was tuned on. Test your real model on a real task before you commit.

Key points

  • Claude Agent SDK centres on a built-in toolset and loop for file and code work; OpenAI Agents SDK on agents, handoffs and guardrails.
  • LangGraph models a workflow as a graph with checkpointed state, which suits long, resumable runs.
  • smolagents lets the model write Python as its action and supports many model back ends, so it needs a sandbox.
  • Google ADK composes agents into sequential, parallel and loop workflows and fits Gemini and Google Cloud.
  • Compare by abstraction, model support, state and tracing, and re-check the docs because all of them change fast.

Common mistakes

  • Choosing the most popular framework instead of the one whose core idea fits.
  • Treating "supports many models" as "works equally well with every model".
  • Using a code-writing agent without a sandbox.
  • Copying a comparison table from an old article without checking the current docs.

Check yourself · 2 of 3

What is the signature idea of smolagents?

Choose one answer

Check yourself · 3 of 3

A task needs an agent that reads, edits and tests files in a repository using Claude. Which SDK ships the matching tools?

Choose one answer

Practice items, not counted towards your mastery.

Start here