★ Reading this for free? Get 25 structured AI courses + per-chapter AI tutor — the first chapter of every course free, no card.Start free in 30 secondsOr own every course: $149 once
AI Agents

Best Ollama Models for AI Agents 2026: Ranked by Tool Use

June 20, 2026
15 min read
Barsha Mohapatra

Want to go deeper than this article?

Free account unlocks the first chapter of all 25 courses — RAG, agents, MCP, voice AI, MLOps, real GitHub repos.

📚AI Learning Path

Ollama’s running. Here’s what to build with it. Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.

Start free
Or own it for life — Lifetime $149, pay once

The best Ollama model for AI agents in November 2026 depends on your VRAM. On a 24 GB card it is Qwen3.8 27B (`qwen3.8:27b`, 16.8 GB, tools + thinking + vision), with Meta's agent-tuned Muse Glimmer 30B (`muse-glimmer:30b`, 16.8 GB) as the alternative. On a 16 GB card it is gpt-oss 20B (`gpt-oss:20b`, 13.8 GB). On 8-12 GB it is still Qwen3 8B (`qwen3:8b`, 5.2 GB). All of them carry Ollama's Tools badge, so agent frameworks call them through the real tools API. A model that writes good prose but emits malformed tool calls is useless in an agent loop, so this ranking puts tool support first and fluency second.

An agent is only as good as its weakest tool call. Below, the Ollama models worth running in an agent loop are ranked by VRAM tier. The evidence is all checkable: the capability badges on each model's Ollama library page, the download size from the Ollama registry, vendor benchmark tables where the vendor publishes one, and, for one model, a speed we measured ourselves. Further down: which model to pair with Hermes Agent, OpenClaw, CrewAI, LangGraph and the coding agents (Claude Code, Codex CLI, OpenCode, Aider, Cline, Continue).

What makes a good Ollama model for AI agents?

A chatbot can ramble and still be useful. An agent cannot. When a model is wrapped in a loop (CrewAI, LangGraph, Hermes Agent, OpenClaw, or your own ReAct harness), three things decide whether it works:

  1. Tool-call reliability. Does it emit valid, schema-correct JSON (or the framework's tool-call format) every time? Or does it sometimes describe the call in prose instead of making it? One malformed call breaks the whole chain.
  2. Multi-step coherence. Can it hold a plan across many tool calls without forgetting earlier results or looping? Models trained for "long-horizon" agent work (Qwen3.8, Muse Glimmer, Nemotron 3.5 Lightning) say so on their model cards. Treat that as a claim to test on your own tasks.
  3. Footprint vs. speed vs. context. Bigger usually means more reliable, but a model that spills out of VRAM crawls, and an agent also needs room for a long context: tool schemas, memory and earlier results. The right pick is the most capable model that fits your card with the context your agent needs.

Ollama exposes a real tools API only for models whose chat template supports it, and it shows a Tools capability badge on each model's library page. Every model ranked below carried that badge on November 2, 2026. For the mechanics of wiring it up, see our Ollama tool-calling guide.

Reading articles is good. Building is better.

Free account = the first chapter of all 25 courses, with a per-chapter AI tutor. No card.

How is this ranking put together?

Four inputs, all things you can verify yourself:

  1. Native tool support. The Tools badge on the model's Ollama library page. Either it is there, or you are prompting your way to JSON.
  2. Download size from the registry. Every size below is the model layer of the tag's manifest on registry.ollama.ai, read on November 2, 2026, not an estimate. Add a few GB for the KV cache, more for agent-length contexts.
  3. Vendor benchmark tables, attributed. Where a vendor publishes agent or tool-use scores (Meta's table for Muse Glimmer, Groq's Berkeley Function Calling Leaderboard result for Llama 3 Groq Tool Use), we quote the number and name the vendor. Where none exists, the table says so instead of inventing one.
  4. Speed: one measurement, otherwise a labelled ceiling. We measured Qwen3 8B on our own Apple M3 Pro. Every other speed figure is a bandwidth ceiling (memory bandwidth ÷ file size), and Mixture-of-Experts models get no number at all, because that formula does not apply to them.

What this deliberately leaves out is a subjective "reliability score". Tool-call behaviour drifts with Ollama versions and template patches. Mistral Small 3.2's tool parser is the standing example: it shipped with parser errors that were fixed across releases. Any single snapshot ages badly. The durable signal is whether the model was trained and templated for tool use at all.

Best Ollama models for AI agents in 2026 (ranked by tier)

RankModelOllama tagDownload (registry)ArchitectureOllama capabilitiesVendor agent / tool-use scoreBest for
🥇 1Qwen3.8 27Bqwen3.8:27b16.81 GB27B densetools, thinking, visionVendor card describes "long-horizon agentic tasks"Best all-round agent on one 24 GB card
🥈 2Muse Glimmer 30Bmuse-glimmer:30b16.76 GB~30B dense (Meta's card)tools, thinking, visionMCP Atlas 75.5 vs 62.5 Qwen3.6-27B and 54.2 Gemma 4 31B (Meta's table)Always-on agents, MCP-heavy loops
🥉 3gpt-oss 20Bgpt-oss:20b13.79 GB20B MoEtools, thinkingNone published on the Ollama pageBest agent model for a 16 GB card
4Qwen3 8Bqwen3:8b5.23 GB8B densetools, thinkingFamily results posted on BFCLThe default on 8-12 GB cards and 16 GB Macs
5Qwen3-Coder 30Bqwen3-coder:30b18.56 GB30B MoEtools—Coding agents (Claude Code, OpenCode, Aider)
6Devstral 24Bdevstral:24b14.33 GB24B densetoolsOllama page: "the best open source model for coding agents" (Mistral's claim)Coding agents on 16-24 GB
7Gemma 4 26B / 31Bgemma4:26b / gemma4:31b17.07 / 18.67 GBMoE / densetools, thinking, vision, audio— (Google's table covers general benchmarks)Structured JSON + images
8Qwen3 14Bqwen3:14b9.28 GB14B densetools, thinkingFamily results posted on BFCLHermes Agent on a 12-16 GB card
9Llama 3 Groq Tool Use 8Bllama3-groq-tool-use:8b4.66 GB8B densetools89.06% BFCL (Groq, Jul 2024)A dedicated "tool node"
10Nemotron 3.5 Lightning 30Bnemotron-3.5-lightning:30b25.43 GB30B MoE (3B active)tools, thinkingNVIDIA: "built for always-on agents"; 1M context32 GB+ cards and Macs
11Qwen3 30B-A3Bqwen3:30b-a3b18.56 GB30B MoE (3B active)tools, thinkingFamily results posted on BFCLThe 2025 MoE pick, still solid
12Mistral Small 3.2 24Bmistral-small3.2:24b15.18 GB24B densetools, vision—Low-latency function calls (check your Ollama build)
13Qwen2.5-Coder 32Bqwen2.5-coder:32b19.85 GB32B densetools—Older dense coding-agent pick
14gpt-oss 120Bgpt-oss:120b65.37 GB120B MoEtools, thinking—80 GB GPUs, 96-128 GB unified memory
15Llama 4 Scout / Maverickllama4:scout / llama4:maverick67.44 / 244.84 GB109B / 400B MoEtools, vision—Workstation and server only

Downloads are the registry's model layer for that exact tag (GB = 10⁹ bytes), checked November 2, 2026. Muse Glimmer's figures are Meta's own, from the comparison table on its Ollama page, in "high reasoning" mode. Groq's BFCL figure is from its July 2024 launch. Rows with a dash have no vendor agent score on the model page. Nothing on this table is our measurement except the Qwen3 8B speed quoted below.

What moved since the August version of this page: Qwen3.8 27B, Muse Glimmer 30B, gpt-oss 20B, Qwen3-Coder, Devstral and Nemotron 3.5 Lightning are new to the ranking. They are the 2026 models that ship with tools badges and agent-specific claims. Qwen3 8B drops from #1 overall to the top pick for small cards, where nothing newer has displaced it. Qwen2.5-Coder 32B now carries Ollama's Tools badge. The earlier version said it did not, and that was out of date. Hermes 4 14B leaves the table because it still has no first-party Ollama tag. See the Hermes section below for how to run it anyway.

Entry tier (≤8 GB VRAM): Qwen3 8B and the tool specialists

Qwen3 8B: still the default on small cards. Released April 29, 2025 under Apache 2.0, it is a 5.23 GB download (ollama pull qwen3:8b). With a working context it lands around 6-8 GB, so it fits an 8 GB card or a 16 GB Mac with room for the framework. It carries the Tools and Thinking badges, so you can toggle reasoning per request and trade latency for better planning per step. It is also the model we measured: 25.3 tok/s measured on our Apple M3 Pro (18 GB) (ceiling 28.7; Ollama 0.40.13, 2026-11-02). That is the speed of one agent turn's output on a mid-range Mac laptop. See the official Qwen3 announcement for the family, and check the current Berkeley Function Calling Leaderboard standings rather than trusting a number frozen into an article.

Qwen3.5 9B: the multimodal small option. qwen3.5:9b (5.63 GB) carries tools, thinking and vision badges. Pick it over Qwen3 8B when the agent has to read screenshots or documents as images.

Llama 3 Groq Tool Use 8B: the specialist. If your agent does little besides call functions, this is the sharpest small tool. Groq built it with Glaive on Meta-Llama-3-8B, fine-tuned with SFT + DPO purely for tool use, and it scored 89.06% overall on the Berkeley Function Calling Leaderboard at its July 2024 launch (#3 overall). The 70B sibling hit 90.76% (#1 at launch). Pull it with ollama pull llama3-groq-tool-use:8b (4.66 GB). The trade-off: it is Llama 3 era, it is narrow, and its 8K context is tight for long agent transcripts. Use it as a function-calling scalpel, not a general reasoner. Spec sheet: Llama 3 Groq 8B.

The tiny tier. lfm3 (Liquid AI, 1.10 GB, tools + thinking) and nemotron-3-nano:4b (2.84 GB, tools + thinking) are built for small agents and routing steps on laptops and CPUs. They are good at deciding which tool to call. Do not ask them to plan a ten-step task.

Own it instead of renting it

Run this on your own machine and stop paying every month

Pay once and keep it. No renewal, no per-token bill, and nothing you feed it ever leaves your hardware.

Mid tier (16-24 GB VRAM): the reliability sweet spot

gpt-oss 20B: the 16 GB pick. OpenAI's open-weight model is a 13.79 GB download (ollama pull gpt-oss:20b) with tools and thinking badges. Its card says it runs "on systems with as little as 16GB memory". It is a Mixture-of-Experts model, so it reads only part of its weights per token and generates faster than its size suggests. Reasoning effort is a per-request setting (low / medium / high). Spend it on planning steps and keep it low for routine tool calls. More in our gpt-oss guide.

Qwen3.8 27B: the best single-GPU agent model. qwen3.8:27b is a 16.81 GB dense model with tools, thinking and vision in one tag. Its Ollama description leads with "long-horizon agentic tasks", and the Hugging Face card lists a 262,144-token native context. On a 24 GB card that leaves about 7 GB for the KV cache, which is what lets a long tool loop stay on the GPU. Apple Silicon users get a 27b-mlx tag. Full VRAM breakdown: Qwen3.8-27B.

Muse Glimmer 30B: the agent-tuned alternative. Meta's Ollama page describes it as "built for always-on local agents … tuned for tool use, long tasks, and failure recovery", under Apache 2.0, with a 128K context and a 16.76 GB download. Meta's own table is the only agent benchmark published for any model in this tier. It scores MCP Atlas 75.5 against 62.5 for Qwen3.6-27B and 54.2 for Gemma 4 31B, but Qwen3.6-27B leads on OSWorld-Verified (75.6 vs 65.9) and TerminalBench 2.1 (60.7 vs 51.7). Read it as "best at MCP tool use, not best at everything", and remember these are the vendor's figures. Details: Muse Glimmer 30B.

Gemma 4 26B and 31B: structured output plus images. Google built the family with native function calling and structured JSON output. gemma4:26b is a MoE (17.07 GB) and gemma4:31b is dense (18.67 GB). The bare gemma4 tag is the small edge model, so pull the size explicitly. See our Gemma 4 guide.

Mistral Small 3.2 24B: low-latency calls, with a caveat. mistral-small3.2:24b (15.18 GB, tools + vision) is tuned for function calling and JSON output. Its tool parser had errors in Ollama around release ("failed to create tool parser") that were patched across versions, so confirm tool calls work on your Ollama build before you rely on it.

Qwen3 30B-A3B: last year's MoE pick. A 30B Mixture-of-Experts model that activates about 3B parameters per token (qwen3:30b-a3b, 18.56 GB; the qwen3:30b tag is the same build). You must hold all 18.6 GB in memory, but only the active experts are read per token, which is why it generates much faster than a dense 30B. Qwen3.8 27B is the stronger choice now, but this is still a good one if you already have it.

Nemotron 3.5 Lightning 30B: for big contexts, on bigger cards. NVIDIA's MoE (30B total, 3B active) is "built for always-on agents" with a 1M-token context on the 30b tag. The catch: the 30b download is 25.43 GB, more than a 24 GB card holds before any context, so it belongs on 32 GB cards or Macs with 48 GB+ of unified memory.

Coding agents: which model behind Claude Code, Codex, OpenCode or Aider?

When people search "best coding agent for Ollama" they usually mean two things: which app runs the loop, and which model to put behind it. For the model:

Your VRAMCoding-agent modelTagDownload
24 GBQwen3-Coder 30B (MoE, 256K context)qwen3-coder:30b18.56 GB
24 GBQwen3.8 27B (dense, coding + agentic)qwen3.8:27b16.81 GB
16-24 GBDevstral 24B (Mistral's coding-agent model)devstral:24b14.33 GB
16 GBgpt-oss 20Bgpt-oss:20b13.79 GB
8 GBQwen3 8B, or Qwen2.5-Coder 7B for editsqwen3:8b / qwen2.5-coder:7b5.23 / 4.68 GB

For the app, each of these has a setup guide on this site, with the exact Ollama configuration:

The one setting that breaks every coding agent is context length. These apps send large system prompts and whole files. Raise Ollama's context (OLLAMA_CONTEXT_LENGTH=32768 or more, memory permitting) before you blame the model.

Best Ollama model for Hermes Agent (and OpenClaw)

Hermes Agent is Nous Research's open agent app (memory, skills, 60+ built-in tools and MCP), not a model. It needs a tool-calling model with a large context: our Hermes Agent + Ollama guide runs it with OLLAMA_CONTEXT_LENGTH=64000, because memory, skill definitions and tool schemas fill a small context almost at once. That requirement decides the pick:

Your hardwareModel for Hermes AgentWhy
8-12 GBqwen3:8b (5.23 GB)Leaves room for a 32-64K context; reliable tool calls
12-16 GBqwen3:14b (9.28 GB)The balanced default in our Hermes guide
16 GBgpt-oss:20b (13.79 GB)Strongest model that still fits, but the context has to stay modest
24 GBqwen3.8:27b or muse-glimmer:30b (≈16.8 GB)About 7 GB left for the KV cache at 64K
24 GB+Hermes 4.3 36B (GGUF import, ≈21.8 GB at Q4_K_M)Nous Research's own model; no first-party Ollama tag, so import the GGUF

Nous Research's own Hermes 4 models (14B on Qwen3-14B, and Hermes 4.3 36B on ByteDance's Seed-OSS-36B) emit tool calls inside <tool_call> tags after a visible reasoning step, which makes their planning easy to follow. Neither has an official Ollama library tag, so you import the GGUF from the NousResearch Hugging Face org with a Modelfile. Our Hermes guide has the exact Modelfile. Confirm the source of any community upload before trusting it.

OpenClaw has the same needs (a tools-capable model and a long context), so the same table applies. Its setup is in our OpenClaw local model guide.

Top tier (multi-GPU / workstation): Llama 4 Scout and Maverick

Above 24 GB the choices are MoE models whose total size, not active size, decides the hardware. gpt-oss 120B (gpt-oss:120b, 65.37 GB) is the most practical: it fits an 80 GB GPU or a Mac or Strix Halo machine with 96-128 GB of unified memory. Llama 4 Scout (llama4:scout, 67.44 GB; 109B total, 17B active, 16 experts) needs the same class of machine. Llama 4 Maverick (llama4:maverick, 244.84 GB; 400B total, 17B active) is a multi-GPU or server deployment, not a desktop one. All three carry the Tools badge. For most local-agent builders they are aspirational: Qwen3.8 27B or Muse Glimmer on one 24 GB card covers most agent work at a fraction of the hardware.

Which model for CrewAI, LangGraph, or Continue?

Each framework stresses a different capability, so "best" changes with the framework:

  • CrewAI runs several role-playing agents that delegate and call tools constantly, so tool-call reliability is everything. Start with Qwen3 8B on modest hardware and Qwen3.8 27B on 24 GB. One bad call cascades across the crew, so the bigger model pays off. See the CrewAI local setup guide.
  • LangGraph builds explicit state-machine graphs where each node may call a tool. It rewards clean, deterministic calls. Use Qwen3.8 27B or Muse Glimmer 30B for the planner nodes, and Llama 3 Groq Tool Use 8B as a cheap dedicated tool node.
  • PydanticAI and other typed frameworks validate every tool argument against a schema, which shows up weak JSON at once. Gemma 4 and Qwen3.8 are the safe picks. See PydanticAI with Ollama.
  • Continue (the IDE assistant) is really a coding agent. Use the coding table above, plus a small coder such as qwen2.5-coder:1.5b for autocomplete.

For the architecture view (memory, planning, tool wiring), read the local AI agents guide or the hands-on build a local AI agent walkthrough. To size the machine itself, see hardware for local AI agents.

Will it be fast enough? Work out the ceiling yourself

For a dense model, token generation is memory-bandwidth bound: every token reads the whole model file once. So:

tokens/sec ceiling = memory bandwidth (GB/s) ÷ model file size (GB)

This is an upper bound, not a prediction. Real output lands below it. On our M3 Pro, the measured dense 7-8B models reached roughly 80-90% of their ceiling at a short context, and longer agent contexts push that lower. Here it is for the dense models in this ranking, using the registry file sizes and vendor bandwidths (NVIDIA: RTX 4090 1,008 GB/s, RTX 3060 12 GB 360 GB/s; Apple: M3 Pro 150 GB/s):

Model (dense)FileRTX 4090 ceilingRTX 3060 12 GB ceilingApple M3 Pro ceiling
qwen3:8b5.23 GB~193 tok/s~69 tok/s~29 tok/s (measured: 25.3)
qwen3:14b9.28 GB~109 tok/s~39 tok/s (tight with context)~16 tok/s
devstral:24b14.33 GB~70 tok/sdoes not fitdoes not fit in 18 GB
qwen3.8:27b16.81 GB~60 tok/sdoes not fitdoes not fit in 18 GB
muse-glimmer:30b16.76 GB~60 tok/sdoes not fitdoes not fit in 18 GB
qwen2.5-coder:32b19.85 GB~51 tok/sdoes not fitdoes not fit in 18 GB
MoE: gpt-oss:20b, qwen3-coder:30b, qwen3:30b-a3b, gemma4:26b, Nemotron 3.5 Lightning13.8-25.4 GBno ceiling printed——

Ceilings are arithmetic labels, not measurements. The one measured figure is from scripts/benchmark-ollama.py on our Apple M3 Pro (18 GB), Ollama 0.40.13, 2 November 2026: median of 6 valid runs. Muse Glimmer is listed as dense on Meta's model card (details on our Muse Glimmer page), so it gets a ceiling like the other dense rows.

Two conclusions follow. First, MoE models break the formula in your favour: they read only their active experts per token, so a 30B MoE generates far faster than a dense 30B. We do not print a number for them, because that depends on how the active weights are spread across memory. Second, and more important than any model choice: keep the whole model in VRAM. A PCIe 4.0 x16 link moves about 32 GB/s. If part of the model has to cross it every token, a ~1,000 GB/s divisor becomes a ~32 GB/s one, roughly a 30× cut to the ceiling. That cliff explains almost every "why is my local agent unusably slow" report. Our VRAM calculator checks a model against your card before you pull 17 GB.

Key takeaways

  1. On 24 GB, run Qwen3.8 27B (qwen3.8:27b, 16.81 GB, tools + thinking + vision). Run Muse Glimmer 30B instead if your agent is MCP-heavy: Meta's own table has it ahead on MCP Atlas (75.5).
  2. On 16 GB, run gpt-oss 20B (13.79 GB, tools + thinking). On 8-12 GB, Qwen3 8B is still the default: 5.23 GB, and 25.3 tok/s measured on our M3 Pro.
  3. For coding agents, use Qwen3-Coder 30B or Devstral 24B behind Claude Code, Codex CLI, OpenCode, Aider or Cline, and raise Ollama's context first.
  4. For Hermes Agent and OpenClaw, budget the context: they need 32-64K tokens, so leave VRAM for the KV cache (Qwen3 14B on 12-16 GB, Qwen3.8 27B on 24 GB).
  5. Check the Tools badge before anything else. Every model ranked here had it on November 2, 2026, including Qwen2.5-Coder, which did not have it when this page was first written.
  6. Fit beats size. Spilling layers to system RAM cuts the speed ceiling by about 30×. Choose the largest model that fits with its context, never simply the largest model.

Next steps

🎯
AI Learning Path

Ollama’s running. Here’s what to build with it.

Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.

Or own it for life — Lifetime $149 $599, pay once
Once your hardware is sorted

Stop piecing Ollama together from blog posts

Ollama Mastery is 15 chapters end to end — install, model choice, Modelfiles, GPU offload, the API, and the 20 errors that actually happen. Plus 24 more courses.

$149 once unlocks everything, forever — about $0.27/chapter for life. Prefer to spread it out? Pro is $79/year (saves 27%) or $8.99/month.
Secure checkout by Lemon Squeezy — your card never touches this siteInstant access the moment you payFirst chapter of every course is free — try before you buy

Liked this? 25 full AI courses are waiting.

From fundamentals to RAG, agents, MCP servers, voice AI, and production deployment with real GitHub repos. First chapter free, every course.

Reading now
Join the discussion
TagsOllamaAI AgentsTool CallingQwen3.8gpt-ossHermes AgentCrewAILangGraph

Barsha Mohapatra

Local AI Master writes hands-on courses and hardware guides for running AI on machines you own. Content is checked against current releases and corrected when readers tell us it is wrong.

Build Real AI on Your Machine

RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.

Want the structured version?

Hands-on courses on local AI, from $8.99 a month. The first chapter of each is free.

AI Learning Path
More on Ollama
See the full Best Ollama Models 2026 guide.

Comments (0)

No comments yet. Be the first to share your thoughts!

📅 Published: June 20, 2026🔄 Last Updated: November 2, 2026✓ Manually Reviewed

Ready to Go Beyond Tutorials?

25 structured courses with hands-on chapters - build RAG chatbots, AI agents, and ML pipelines on your own hardware.

🎯
AI Learning Path

Go from reading about AI to building with AI

25 structured courses. Hands-on projects. Runs on your machine. Start free.

Or own it for life — Lifetime $149 $599, pay once

Was this helpful?

Barsha Mohapatra

Written by

Barsha Mohapatra

Founder and Editor, Local AI Master · Founder, Little AI Master

Founder of Little AI Master and the editor behind every course and guide on Local AI Master. Years of tutoring students taught her where AI education actually fails.

📚
Free · no account required

Grab the AI Starter Kit — career roadmap, cheat sheet, setup guide

No spam. Unsubscribe with one click.

🎯
AI Learning Path

Ollama’s running. Here’s what to build with it.

Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.

Or own it for life — Lifetime $149 $599, pay once
Free Tools & Calculators