# Ag · Agent Framework — element 9 of 58

> Give your model hands. Turns a chat model into a working colleague.

- **Group:** 3 · Agents & Automation
- **Necessity:** Optional
- **Price band:** Free
- **Maturity:** Emerging
- **Edition:** v2026.Q3 · verified 2026-09-13

## Leading tools (v2026.Q3)

- **LangGraph** — stateful graphs, production default
- **OpenAI Agents SDK** — the default path
- **CrewAI** — multi-agent teams, fast
- **Pydantic AI** — type-safe, agents as software
- **Mastra** — the typescript stack

## Our take

Frameworks churn fast; the concepts don't. Learn loops, tools, and state once — the brand names will rotate under you.

## Combines with

Fm, Mc, Or
- Guide: [Best agent framework (2026)](https://elems.ai/best/best-agent-framework-2026.html)

## The top 5 — deep dossier (verified 2026-09-13)

LangGraph, if you can only hold one — the biggest install base by far (71.6M monthly PyPI pulls, Aug 2026), the only framework with a year-old stable 1.0 and a no-breaking-changes-until-2.0 promise, and the durable-state runtime that Uber, LinkedIn, Klarna, JPMorgan and Rippling actually run in production. OpenAI Agents SDK is the pick when you want the fewest abstractions on the OpenAI stack — 16 lines to a working agent, now with a sandboxed long-horizon harness (Apr 2026). CrewAI wins when role-based multi-agent teams and speed-to-demo matter more than token efficiency; Pydantic AI when you want agents treated as typed, testable software; Mastra when your company is TypeScript. And remember the element's own take: a plain tool loop is ~50 lines — learn loops, tools and state before you marry any brand name.

1. **LangGraph** (LangChain) — Framework free (MIT) · LangSmith/Platform: Dev $0 + usage · Plus $39/seat/mo · Enterprise custom. Best for: Long-running, stateful agents that must survive restarts, pause for human approval, and resume — the production-grade default. Why: The category's center of gravity: 71.6M monthly PyPI downloads (Aug 2026), 38.1k stars, and 1.0 stable since Oct 22, 2025 with API stability promised until 2.0 — rare discipline in a churn-heavy category. Checkpointed persistence, human-in-the-loop interrupts, and time-travel debugging are native, not bolted on; the same graph runtime powers deployments at Uber, LinkedIn, Klarna, JPMorgan and Rippling. Watch: The steepest learning curve of the top five — graph ceremony is overkill for simple tool loops, and the ecosystem's gravity pulls you toward paid LangSmith/Platform ($1.50/LCU adds up on chatty agents). Aggregate download counts include heavy CI/mirror traffic — treat absolutes with care. [https://www.langchain.com/langgraph](https://www.langchain.com/langgraph)
2. **OpenAI Agents SDK** (OpenAI) — Free (MIT) · you pay standard OpenAI API token + tool pricing · works with 100+ providers via LiteLLM. Best for: The shortest path from idea to working agent — minimal primitives (agents, handoffs, guardrails, sessions) with OpenAI's weight behind them. Why: The canon's 'default path' earned it: 35.5M monthly PyPI downloads and 26.3k stars by Aug 2026, and the April 15, 2026 update added what it lacked — a model-native harness with sandboxed execution (E2B, Modal, Cloudflare, Vercel), workspace manifests, and durable long-horizon runs with snapshotting. Oscar Health and LexisNexis vouched for production viability at launch. Watch: Still pre-1.0 (v0.19.4) after 99 releases — API drift is real and testers hit breaking changes. Provider-agnostic on paper, but tracing, evals, and the new harness all pull you deeper into the OpenAI platform. [https://openai.com/index/new-tools-for-building-agents/](https://openai.com/index/new-tools-for-building-agents/)
3. **CrewAI** (CrewAI Inc.) — OSS free (MIT) · Platform: free tier 50 executions/mo · Enterprise custom (SSO, RBAC, forward-deployed engineers). Best for: Role-based multi-agent teams — describe agents as colleagues with roles, goals and tools, and get a working crew in an afternoon. Why: The most-starred dedicated agent framework (56.4k, Aug 2026) and the one that made multi-agent legible to non-researchers. 2B agent executions in the 12 months to Apr 2026, ~14.3M monthly PyPI downloads, and an enterprise platform (Studio, Control Plane) the company says reaches 65% of the Fortune 500 — a vendor claim, but DocuSign, PepsiCo and Experian are named customers. Watch: The tested weaknesses are consistent: an 856MB install dragging unneeded dependencies, 4.0s median latencies (slowest of the majors bar Claude SDK), and multi-agent chatter that inflates token costs 3–5x. Only $18M raised — thin capitalization next to LangChain's $260M if the category consolidates. [https://www.crewai.com](https://www.crewai.com)
4. **Pydantic AI** (Pydantic Services) — Free (MIT) · optional Logfire observability (free tier, then usage-based). Best for: Production Python teams who want agents treated as typed, testable software — validation, dependency injection, structured streaming. Why: The 'agents are software' thesis, from the team whose validation library sits under every other framework on this page. v1 stable Sept 2025, now v2.24 with durable execution (Temporal/DBOS) and graph support; 16.1M monthly PyPI downloads by Aug 2026 — past CrewAI on installs with a third of the stars. Independent testing found reference agents in ~160 lines vs 280 (LangGraph) and 420 (CrewAI), with whole bug classes caught at type-check time. Watch: Smallest community of the top five (17.5k stars), no visual tooling or hosted runtime — you bring your own deployment story. Moved fast from v1 to v2; 'stable' has meant less here than at LangChain. [https://pydantic.dev/docs/ai/overview](https://pydantic.dev/docs/ai/overview)
5. **Mastra** (Mastra (YC W25, ex-Gatsby team)) — Framework free (Apache-2.0, EE dirs licensed) · Cloud: Starter $0 · Teams $250/mo · Enterprise custom. Best for: TypeScript-first teams building agent products — agents, workflows, memory, evals and a visual studio in one modern TS stack. Why: The TypeScript answer to LangGraph, and the surprise winner of AgentMail's 9-framework 2026 bake-off (fastest median latency at 2.2s, competitive token overhead). 26.9k stars by Aug 2026, running in production at Replit, SoftBank, Sanity and WorkOS, with workflow suspend/resume, semantic-recall memory and Mastra Cloud shipping monthly (managed sandboxes and rubric scorers landed Aug 2026). Watch: Youngest of the five — the open-core split (Apache core, 'Mastra Enterprise License' ee/ directories) appeared in 2026 and is worth reading before you depend on a feature. TypeScript only; Python shops should look elsewhere. [https://mastra.ai](https://mastra.ai)

### How to choose
- If Your agent must run for hours, survive a restart, and pause for a human sign-off → LangGraph — checkpointed persistence and interrupts are the core product, not a plugin, and the 1.0 API-stability promise de-risks the bet.
- If You're OpenAI-committed and want the fewest abstractions between you and a working agent → OpenAI Agents SDK — ~16 lines to a tool-calling agent, plus the Apr 2026 sandboxed harness for long-horizon work. Accept pre-1.0 API drift as the tax.
- If You need a multi-agent demo for stakeholders this week, or business-process automation with named roles → CrewAI — fastest concept-to-crew of the majors. Budget for the 3–5x token multiplier that agent chatter brings before you ship it.
- If Your company writes TypeScript → Mastra for agent-first products; Vercel AI SDK's ToolLoopAgent if you're just adding agent features to an existing Next.js/React app.
- If Correctness, testing, and maintainability outrank orchestration ceremony → Pydantic AI — typed outputs, dependency injection, and ~40% less code than LangGraph on reference builds. Also the honest default if a plain 50-line tool loop would do: learn loops, tools and state; the brand names rotate.

### The field (21 more)

Microsoft Agent Framework, Claude Agent SDK, Vercel AI SDK, smolagents, Google ADK, Strands Agents, Agno, Letta, LlamaIndex Workflows, Haystack, AG2, AutoGen (sunsetting), Semantic Kernel (sunsetting), DSPy, AutoGPT, BabyAGI (fading), MetaGPT (fading), SuperAGI (fading), ElizaOS, CAMEL / OWL, Griptape (fading)

Full dossier data: https://elems.ai/e/ag.json

---
Source: [elems.ai](https://elems.ai/e/ag.html) — the periodic table of the AI-led startup. Data: https://elems.ai/elements.json (CC BY 4.0, cite elems.ai).
