Agent workloads punish models differently than chat does: a mediocre answer costs one turn, but a bad tool call, a hallucinated file path or a silent early exit costs the whole trajectory. The models below are ranked on the benchmarks that stress exactly that — Terminal-Bench, SWE-bench Pro, OSWorld — plus the two things benchmarks miss: what the model costs per task (not per token), and how it fails.

How we picked
Same rules as every ranking on this site: sourced claims, dated pricing, generally available models only. Agent-specific additions: we weight multi-step benchmarks over single-turn ones, and we flag per-task economics wherever token consumption diverges from sticker price — which in this category is often.
The short answer
| Your situation | Pick |
|---|---|
| Production agent fleet, best value | Claude Sonnet 5 |
| Days-long autonomous runs, capability ceiling | Claude Fable 5 |
| Terminal/CLI agents, multimodal input | GPT-5.6 |
| Computer use, expensive-mistake domains | Claude Opus 5 |
| Multi-model orchestration, vendor resilience | Sakana Fugu |
| Self-hosted / open weights | GLM-5.2 |
All six, side by side
No single chart here on purpose: agent benchmarks run on different harnesses and versions (Terminal-Bench 2.0 vs 2.1, Codex vs Claude Code), and charting them as one series would manufacture precision that doesn’t exist. The matrix labels each number’s provenance instead:
| Model | Agent benchmark highlight | Price (in/out per 1M) | Context | Failure mode to plan for |
|---|---|---|---|---|
| Sonnet 5 | Terminal-Bench 2.1 80.4% | $2 / $10 intro | 1M | ~3× agentic turns at max effort — watch per-task cost |
| Fable 5 | SWE-bench Pro 80.3% · TB 2.1 88.0% | $10 / $50 | 1M | Classifier fallback to Opus on cyber/bio topics |
| GPT-5.6 Sol | Terminal-Bench 2.1 91.91% | $5 / $30 | 1.05M | Sol output pricey; Luna limited on complex tasks |
| Opus 5 | OSWorld 2.0 70.6% · AutomationBench 26% | $5 / $25 | 1M | Slightly higher hallucination rate vs Opus 4.8 |
| Fugu | Vendor-reported TB 2.1 parity with Fable | $5 / $30 Ultra + orchestration tokens | 272K+ | Routing variance; EU/EEA unavailable |
| GLM-5.2 | SWE-bench Pro 62.1% | ~$1.40 / $4.40 | 1M | Self-hosting a 753B MoE is an ops project |
The reasoning, pick by pick
1. Claude Sonnet 5 — the fleet default
Sonnet 5 is the rare “best overall” that’s also the cheapest frontier option: Terminal-Bench 2.1 at 80.4% (13 points over Sonnet 4.6), a tie with Opus 4.8 on agentic knowledge work (GDPval-AA v2 1,618 vs 1,615), and $2/$10 introductory pricing through August 31 before reverting to $3/$15.
One economics caveat that matters for agents specifically: Sonnet 5 spends ~40% more output tokens and roughly 3× the agentic turns of Opus 4.8 at max effort, so Artificial Analysis measured its per-task cost about 15% above Opus 4.8 at standard pricing. Tune the effort parameter down for routine steps — or enjoy the intro window while it lasts.
Strengths: near-Opus agentic quality at the lowest frontier price; 13-point Terminal-Bench jump over its predecessor; 1M context. Watch out: token appetite flips per-task math at standard pricing; intro rate ends August 31; new tokenizer inflates counts 1.0–1.35×.
2. Claude Fable 5 — the autonomy ceiling
Fable 5 is what you escalate to when the task outgrows everything else: state-of-the-art on nearly every tested benchmark, SWE-bench Pro at 80.3% — 11 points above Opus 4.8 — and explicitly built for days-long asynchronous agent runs.
Two things to budget for. Price: $10/$50 is double Opus 4.8 (Batch API halves it). And the safety fallback: classifiers route cyber, bio/chem and distillation topics to Opus 4.8 mid-run — under 5% of sessions on average, but 20.9% of Terminal-Bench trials, so security-adjacent engineering agents will see it regularly. Design your harness to tolerate the model swap.
Strengths: state-of-the-art on nearly every benchmark; built for days-long asynchronous runs; low effort beats rivals’ max. Watch out: double Opus pricing; mid-run classifier fallback on security topics; system card documents fabricated status reports on silently failed work — verify agent claims.
3. GPT-5.6 — the terminal king
GPT-5.6 is now GA with three tiers. Sol ultra holds the Terminal-Bench 2.1 record at 91.91%, making it the clear pick for agents that live in a shell. Three pricing tiers let you route by difficulty: Sol ($5/$30) for hard problems, Terra ($2.50/$15) for routine work, Luna ($1/$6) for fast tasks. 1.05M context, natively omnimodal (text, image, audio, video).
Strengths: Terminal-Bench record-holder; three-tier pricing for per-task routing; 1.05M context; natively omnimodal. Watch out: Sol output at $30/1M is still pricey; Luna struggles on complex agent chains; SWE-bench Pro data not yet published.
4. Claude Opus 5 — the new flagship
Opus 5 replaces Opus 4.8: OSWorld 2.0 at 70.6% surpasses Fable 5, Zapier AutomationBench 26% (~1.5× the next-best), SWE-bench Pro 79.2% (only 1 point behind Fable). Same $5/$25, thinking on by default — trading marginally higher hallucination for massive agentic gains. The new default for expensive-mistake agents.
Strengths: OSWorld 2.0 surpasses Fable; AutomationBench leader; a third of Fable’s price. Watch out: slightly higher hallucination rate vs Opus 4.8; released one week ago, production battle-testing still early.
5. Sakana Fugu — the orchestrator
Fugu is a different animal: itself a model trained to delegate, routing each task across a swappable pool of frontier and open models behind one OpenAI-compatible endpoint. Vendor-reported results put Fugu Ultra shoulder-to-shoulder with Fable 5 on hard engineering benchmarks — notable since no Anthropic model is in its pool. The trade-offs: orchestration tokens inflate bills on multi-agent runs, quality depends on routing, and it’s unavailable in the EU/EEA at launch.
Strengths: vendor resilience by architecture — the pool routes around any one provider’s outage; OpenAI-compatible drop-in; excels at long messy research and review tasks. Watch out: orchestration tokens make multi-agent runs cost more than one model call; parity claims are vendor-reported; EU/EEA unavailable at launch.
6. GLM-5.2 — the open-weight pick
GLM-5.2 leads the open cluster where it counts for agents: SWE-bench Pro 62.1 — beating GPT-5.5’s 58.6 — with a stable 1M context and an MIT license. Via API it’s ~$1.40/$4.40, roughly a tenth of frontier rates; self-hosted, it’s the strongest agent brain you can run on your own metal. It’s what we’d reach for in Claude Code, Aider or Cline when the budget says no to frontier pricing.
Strengths: beats GPT-5.5 on the hardest coding split; MIT license, no regional limits; a tenth of frontier pricing; data never leaves your infra when self-hosted. Watch out: 753B MoE self-hosting is a real ops commitment; no published Terminal-Bench score; younger tooling ecosystem.
Choosing in practice
- Start with Sonnet 5 and measure per-task cost on your actual workload — effort settings move the bill more than the rate card does.
- Escalate to Fable 5 only the trajectories that fail on Sonnet — a two-tier fleet captures most of the ceiling at a fraction of the cost.
- Keep approval gates on irreversible actions regardless of model. Calibration reduces silent failures; it doesn’t eliminate them.
Full specs for every model live in the models directory. Related: Best LLMs for Coding. This ranking reflects the field as of July 29, 2026.
Changelog
- 2026-07-29 — July update: Opus 5 replaces Opus 4.8 (OSWorld 2.0 + AutomationBench lead); GPT-5.6 GA replaces GPT-5.5 (Terminal-Bench 91.91%).
- 2026-07-02 — Initial ranking published: Sonnet 5 · Fable 5 · GPT-5.5 · Opus 4.8 · Sakana Fugu · GLM-5.2. Reflects Sonnet 5’s June 30 launch and Fable 5’s July 1 return.
Frequently asked questions
What is the best LLM for building AI agents?
For most production agents, Claude Sonnet 5 — near-Opus quality on agentic benchmarks (Terminal-Bench 2.1 80.4%) at $2/$10 introductory pricing, the cheapest capable frontier model as of July 2026. For maximum capability on long autonomous runs, Claude Fable 5 is the ceiling at $10/$50.
Which model is best for long-running autonomous agents?
Claude Fable 5 — it was built specifically for days-long, asynchronous agent work and holds state-of-the-art results on nearly every tested benchmark (SWE-bench Pro 80.3%). One operational caveat, its safety classifiers fall back to Opus 4.8 on cyber and bio/chem topics, which hit 20.9% of Terminal-Bench trials.
What is the cheapest good model for agents?
Among our picks, GLM-5.2 via API at roughly $1.40/$4.40 per 1M tokens — about a tenth of frontier pricing — while beating GPT-5.5 on SWE-bench Pro. If you want a frontier lab behind it, Claude Sonnet 5's $2/$10 introductory pricing (through August 31, 2026) is the value window.
Do agent benchmarks like Terminal-Bench and OSWorld actually matter?
Directionally, yes — they measure multi-step tool use, error recovery and task completion rather than single-turn answers. But scores vary by harness and effort setting, and token consumption differs wildly between models (Sonnet 5 spends ~3× the agentic turns of Opus 4.8 at max effort). Always benchmark on your own workload before committing a fleet.
How often is this ranking updated?
We re-check picks when major models ship. This ranking reflects the field as of July 2, 2026.