hubagenticai

Compare & Decide Intermediate · 10/12

Agent frameworks vs. rolling your own harness: build or buy the loop?

LangGraph, CrewAI, Microsoft Agent Framework, Pydantic AI, the OpenAI, Google and Claude agent SDKs — or 200 lines of your own code? A decision framework based on what agent frameworks actually provide, plus a dated map of the options.

updated 2026-10-08

The agent loop is about 40 lines of code. Agent frameworks are tens of thousands. That gap is either valuable machinery or expensive indirection, and which one depends on your system — not on the framework’s README.

What frameworks actually sell

Strip the marketing and every agent framework bundles five things:

CapabilityBuild-it-yourself costNotes
The loop itselfAn afternoonGenuinely trivial — never adopt a framework for this
Provider abstractionLowA gateway (LiteLLM et al.) does this better anyway
State & resumabilityHighDurable, replayable multi-step state is real engineering
Parallel / graph orchestrationHighFan-out, joins, retries across agents
Observability hooksMediumOTel GenAI conventions are closing this gap (tutorial)

The honest summary: frameworks are cheap substitutes for the two rows that are expensive, and expensive substitutes for the three rows that are cheap.

When rolling your own wins

  • One agent, < ~10 tools, request-scoped state. The loop + your language’s stdlib is less code than the framework’s config.
  • You need to understand failures deeply — every abstraction layer between you and the model call is a layer you’ll debug through at 2 a.m.
  • Tight latency or cost budgets. Frameworks add turns, tokens, and serialization you didn’t choose.

When the framework wins

  • Long-running, resumable work — jobs that survive a process restart mid-trajectory. Durable execution is the single strongest reason to buy (or to adopt a durable-execution engine underneath your own loop; see long-running agent tasks).
  • Genuine multi-agent graphs — parallel branches with joins and per-branch retry policies get ugly fast in hand-rolled code.
  • Team scale — five teams hand-rolling five harnesses is five sets of conventions to review; a shared framework is a shared vocabulary.

The options, as of October 2026

Versions are the latest releases on PyPI or npm on 2026-10-08. This space ships weekly, so treat the versions as a snapshot and the “shape” column as the durable part.

OptionShapeLanguageLatestNotes
LangGraphGraph of steps with checkpointed statePython, JS1.2.14The durable-state specialist: checkpointers, interrupts for human approval. For a plain tool-calling agent, LangChain’s create_agent now replaces the deprecated create_react_agent.
CrewAIRole-based “crews” of agents plus event-driven flowsPython1.15.26Fast to a multi-agent demo. Its MCP adapter still pins the 1.x MCP SDK.
Microsoft Agent FrameworkAgents plus graph workflowsPython, .NET1.21.0 (1.0 GA 2026-04-02)Successor to AutoGen and Semantic Kernel, which are now maintenance-only.
Pydantic AITyped agents, validated outputsPython2.54.0 (2.0 on 2026-06-23)V2 reorganized around composable “capabilities”; V1 gets security fixes for a period.
OpenAI Agents SDKAgents, handoffs, guardrails, sessionsPython, JS0.23.1 (JS 0.20.0)Adds sandboxed, resumable workspaces (“sandbox agents”). Works with other providers through adapters.
Google ADKAgents and workflow agentsPython (also Java, others)2.11.0Major 2.x line during 2026.
Claude Agent SDKClaude Code’s harness as a libraryPython, TS0.2.165 (TS 0.3.295)Built-in file, shell and web tools, hooks, subagents, skills, MCP. Claude-only; use an API key, not a consumer login, in products.
AWS Strands AgentsModel-driven loop, minimal scaffoldingPython1.59.0Close to the bare loop, with AWS integrations.
LlamaIndexRetrieval-first agents and workflowsPython0.14.25Strongest when the agent is mostly about your documents.
Mastra / Vercel AI SDKAgent and workflow toolkitsTypeScript1.75.0 / 7.0.135The usual picks for TS web stacks.

Two patterns stand out. First, the provider SDKs (OpenAI, Google, Claude) have grown into real harnesses, so “framework vs. own loop” now has a middle option: the vendor’s loop. That is the right call when you’re committed to one provider, and the wrong one if you want to route between models. Second, MCP support lags the spec. On 2026-10-08, CrewAI, Microsoft Agent Framework and langchain-mcp-adapters still required the 1.x MCP Python SDK (mcp<2), which predates the 2026-07-28 spec revision, while the OpenAI Agents SDK, Google ADK and Strands allowed 2.x. Check a framework’s MCP dependency before you assume it speaks the current revision.

The trap to avoid either way

Coupling your business logic to the harness. Tools, prompts, and evals should be plain functions and data that would survive a framework swap — the eval harness you build should run against a LangGraph agent and a hand-rolled one identically. Teams that keep that boundary clean can defer this whole decision; teams that don’t have already decided, permanently, by accident.

newsletter

One practical agentic-AI guide in your inbox. No news, no hype.

Tutorials and decision frameworks as they ship. Unsubscribe anytime.

Quick Jump: