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.
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:
| Capability | Build-it-yourself cost | Notes |
|---|---|---|
| The loop itself | An afternoon | Genuinely trivial — never adopt a framework for this |
| Provider abstraction | Low | A gateway (LiteLLM et al.) does this better anyway |
| State & resumability | High | Durable, replayable multi-step state is real engineering |
| Parallel / graph orchestration | High | Fan-out, joins, retries across agents |
| Observability hooks | Medium | OTel 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.
| Option | Shape | Language | Latest | Notes |
|---|---|---|---|---|
| LangGraph | Graph of steps with checkpointed state | Python, JS | 1.2.14 | The 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. |
| CrewAI | Role-based “crews” of agents plus event-driven flows | Python | 1.15.26 | Fast to a multi-agent demo. Its MCP adapter still pins the 1.x MCP SDK. |
| Microsoft Agent Framework | Agents plus graph workflows | Python, .NET | 1.21.0 (1.0 GA 2026-04-02) | Successor to AutoGen and Semantic Kernel, which are now maintenance-only. |
| Pydantic AI | Typed agents, validated outputs | Python | 2.54.0 (2.0 on 2026-06-23) | V2 reorganized around composable “capabilities”; V1 gets security fixes for a period. |
| OpenAI Agents SDK | Agents, handoffs, guardrails, sessions | Python, JS | 0.23.1 (JS 0.20.0) | Adds sandboxed, resumable workspaces (“sandbox agents”). Works with other providers through adapters. |
| Google ADK | Agents and workflow agents | Python (also Java, others) | 2.11.0 | Major 2.x line during 2026. |
| Claude Agent SDK | Claude Code’s harness as a library | Python, TS | 0.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 Agents | Model-driven loop, minimal scaffolding | Python | 1.59.0 | Close to the bare loop, with AWS integrations. |
| LlamaIndex | Retrieval-first agents and workflows | Python | 0.14.25 | Strongest when the agent is mostly about your documents. |
| Mastra / Vercel AI SDK | Agent and workflow toolkits | TypeScript | 1.75.0 / 7.0.135 | The 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.
Was this guide useful?
Thanks — noted. It shapes what gets written next.
newsletter
One practical agentic-AI guide in your inbox. No news, no hype.
Tutorials and decision frameworks as they ship. Unsubscribe anytime.