How to choose a model for each agent task in Agno
Pick a model per agent: reasoning depth, tool calling, context, latency, cost, and where the data can go, with fallbacks for when a provider fails.
Cosette CresslerContent & Product Marketing LeadSeptember 22, 202611 min read
Model IDs below were checked against Agno's docs on the publication date shown. Providers rename and retire models often; confirm the ID on the provider's page before you ship.
To choose a model for an Agno agent, start with the task that agent performs. For most general agents, start with openai:gpt-5.4 or anthropic:claude-sonnet-4-5-20250929; use openai:gpt-5.4-mini for high-volume lookups and a local model through Ollama or vLLM when data can't leave your infrastructure. These seven questions narrow it down:
- How much reasoning does the task need?
- Does the agent call tools?
- Does it process media, reading or returning images, audio, or video?
- How long does the context run?
- How fast must the answer arrive?
- What can each call cost?
- Can the data leave your infrastructure?
Agno works with any LLM provider through more than 50 provider adapters, and it sets the model per agent, with an optional fallback model that answers when the primary one is unavailable. So one system can run a frontier model where judgment matters and a small one where it doesn't.
An invoicing product shows why the question is per agent. The agent that answers "what does Northwind owe us?" runs a few hundred times an hour and has to be cheap and quick. The agent that drafts a collection email runs a few times a day and has to sound like a person who read the account history. The agent that reads uploaded contracts handles data the customer won't let leave their cloud, so it has to be a local model served with Ollama or vLLM inside it. So the product runs three agents on three different models, all in the same AgentOS.
This page replaces the model recommendations in A practical guide to AI model selection in Agno, which were current as of November 2025. The selection criteria in that post still apply, but its model IDs are out of date.
What models and providers does Agno support?
Agno supports more than 50 provider adapters, including OpenAI, Anthropic, Google Gemini, AWS Bedrock, Azure OpenAI and Azure AI Foundry, Vertex AI, Groq, Mistral, Cohere, DeepSeek, xAI, Together, Fireworks, Perplexity, Nvidia, Hugging Face, Cerebras, and gateways such as OpenRouter, LiteLLM, and Portkey. For local and self-hosted models it supports Ollama, vLLM, LM Studio, and llama.cpp. The full list, with what each adapter supports, is in the compatibility table.
Every adapter takes the same model= slot on an agent, so the provider choice never leaks into instructions, tools, or memory.
What decides which model an agent should use?
| Question | What it rules out | What it points to |
|---|---|---|
| Does the task need multi-step reasoning? | Small and fast models on planning, math, code review, and anything with a hidden dependency | A reasoning-capable model, or a separate reasoning_model in front of a cheaper response model |
| Does the agent call tools? | Any model without reliable tool calling. The compatibility table charts modalities per adapter, not tool calling, so confirm it on the provider's model page and test your own schemas | A model that returns well-formed tool calls under load, which every current frontier model does. Small local OSS models, Llama 3B and similar, are unreliable at it |
| Does the task process media? | Text-only models when the agent has to read or return images, audio, or video | A multimodal model; the compatibility table charts which media paths each adapter carries |
| How long is the context? | Models whose window your session history and knowledge results will overflow | A long-context model, or session summarization so the window stops growing |
| How fast must it answer? | Reasoning models on chat-speed paths; a thinking pass adds seconds | A "mini" or "flash" tier for the interactive path, with the heavy model behind it |
| What can each call cost? | Frontier models on high-volume, low-stakes lookups | A smaller model by default, with fallback_models or per-agent overrides for the calls that justify more |
| Can the data leave your cloud? | Every hosted API | A local model through Ollama or vLLM behind AgentOS |
Work through these questions for each agent. The invoicing product above lands on a mini model for lookups, a frontier model for the collections writer, and a local model for the contract reader.
Which model should I use with Agno?
Start with openai:gpt-5.4 or anthropic:claude-sonnet-4-5-20250929 for a general agent, openai:gpt-5.4-mini for high-volume lookups, and a local model through Ollama when the data can't leave your infrastructure. Every ID in this table appears in Agno's current docs or examples.
| Task | Start with | Why |
|---|---|---|
| General assistant, chat, drafting | openai:gpt-5.4 or anthropic:claude-sonnet-4-5-20250929 | Strong tool calling, structured output, and long context on both; pick by which provider you already pay |
| High-volume lookups, classification, routing | openai:gpt-5.4-mini | Same tool-calling behavior at a fraction of the cost and latency |
| Multi-step planning, code review, analysis | A reasoning model as reasoning_model, with the general model above for the response | Keeps the thinking pass off the interactive path and off the bill for simple turns |
| Image, audio, or video input | Gemini through agno.models.google, or OpenAI for image and audio | Widest modality support in the compatibility table |
| Data that can't leave your infrastructure | ollama:llama3.1 for development, vLLM behind AgentOS for production | No external API call; see Run models locally with Ollama |
| Provider outage or rate-limit resilience | Any of the above plus fallback_models | Agno retries on a second provider without a code change |
Treat the table as a starting point and adjust per agent once you've seen real traffic.
How do I set the model in Agno?
Pass the model as a provider:model_id string or as a provider class. The string form uses the provider's defaults. The class form takes parameters, custom clients, endpoints, and retries.
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
# String form: defaults
agent = Agent(model="openai:gpt-5.4", markdown=True)
# Class form: provider parameters
agent = Agent(
model=OpenAIResponses(id="gpt-5.4", temperature=0.2),
markdown=True,
)Switching providers is a one-line change in either form. The agent's instructions, tools, and memory stay put, and Agno handles the provider's API shape.
How do I use a reasoning model without slowing the agent down?
Set reasoning_model to a reasoning-capable model and leave model on a general one. Agno runs the reasoning model first and hands its output to the response model, so the user gets an interactive-speed reply with a thinking pass behind it.
agent = Agent(
model="anthropic:claude-sonnet-4-5-20250929",
reasoning_model="groq:deepseek-r1-distill-llama-70b",
)The reasoning model only runs when the agent needs to reason, so simple turns cost a single call. Fallback configuration wraps the primary model only; reasoning_model, parser_model, and output_model calls run without it.
What happens when the provider goes down?
fallback_models retries the primary model's call on the next model in the list when the first one errors out. To handle rate limits and context overflow separately, use FallbackConfig.
from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.models.openai import OpenAIChat
agent = Agent(
model=OpenAIChat(id="gpt-5.4-mini"),
fallback_models=[Claude(id="claude-sonnet-4-5-20250929")],
)Pick the fallback from a different provider, and confirm it supports the same features the primary does: tool calling, structured output, and the modalities you send. If the fallback can't call your tools, an outage will produce wrong answers instead of errors.
Can I use different models for different agents?
Yes. Each agent in a team takes its own model, and the team leader takes one too. Put the frontier model on the leader and on any member whose output the user reads directly. Put mini models on members that fetch, filter, or classify. Don't put a model that's weak at tool calling on the Team itself: the leader hands off to members through tool calls, so a leader that calls tools badly can't delegate at all.
This is also how you route requests to cheaper models automatically. The leader decides which member handles a request, and each member carries its own model, so a lookup lands on gpt-5.4-mini and a drafting task lands on the frontier model without a router in your code.
from agno.agent import Agent
from agno.team import Team
lookup = Agent(name="Lookup", model="openai:gpt-5.4-mini", tools=[...])
writer = Agent(name="Writer", model="anthropic:claude-sonnet-4-5-20250929")
team = Team(
name="Invoicing",
model="openai:gpt-5.4",
members=[lookup, writer],
)Can I run agents on local models with Ollama or vLLM?
Yes. Point model at a local adapter and nothing else changes. For development, ollama:llama3.1 runs on a laptop and the Ollama page lists other models that work well. For production, serve the model with vLLM and use the VLLM adapter, or use the OpenAIChat adapter with base_url pointed at any OpenAI-compatible endpoint. The contract reader in the invoicing product runs this way: the customer's contracts never leave the cloud the agent runs in.
Local models trail the frontier on tool calling and structured output, and the small ones especially, so test your tool schemas against the model you plan to serve before you commit.
Which features does the model support?
Compatibility depends on the Agno adapter, the provider endpoint, and the model ID together. Before you build on any of these, confirm the combination in the compatibility table:
- Tool calling. The model has to accept tool schemas and return tool calls.
- Structured output. The adapter needs native schema support, JSON mode, or the structured-output tool path.
- Multimodal. The adapter has to handle the media types you send or expect back. Gemini covers image, audio in and out, video, and files. OpenAI covers image, audio, and files. Claude covers image and file input.
- Streaming. Both the endpoint and the model have to support it.
The checkmarks in that table chart modalities per adapter, and a checkmark is an adapter-level signal: the specific model ID still has to support the modality. Tool calling, structured output, and streaming are not charted per model, so verify those on the model ID itself.
How do you keep your model choice from going stale?
Providers release new model IDs every few months and retire old ones with little notice. The newest ID from a provider is often not the one in a framework's examples. The IDs on this page are the ones Agno's docs and cookbooks use today, while OpenAI's price list has already moved to the GPT-6 line. Either works with the same adapter.
Pin the ID you tested; gpt-5.4 names a specific model, and a dated ID like claude-sonnet-4-5-20250929 is more specific still, so don't point production at an alias that moves. Before you switch, run your eval suite against the new model and compare: Agno turns response criteria and expected tool use into cases you can run in development and gate CI on. And read cost per task rather than per token: a model that costs twice as much per token but finishes in one call instead of three comes out cheaper, and Agno's session metrics show tokens and cost per run so you can check.
Frequently asked questions
Start with openai:gpt-5.4 or anthropic:claude-sonnet-4-5-20250929 for a general agent, openai:gpt-5.4-mini for high-volume lookups, and a local model through Ollama when data can’t leave your infrastructure. Then adjust per agent using the seven questions in this guide.
More than 50 adapters, covering OpenAI, Anthropic, Google, AWS Bedrock, Azure, Vertex AI, Groq, Mistral, Cohere, DeepSeek, xAI, Together, Fireworks, and gateways such as OpenRouter and LiteLLM, plus Ollama, vLLM, LM Studio, and llama.cpp for local models. The compatibility table lists every one.
Yes. Every provider goes through the same model= slot, and any OpenAI-compatible endpoint works through OpenAIChat with a custom base_url, so a provider without a dedicated adapter still works.
Yes. model is set per agent and per team leader. Run a frontier model where the output faces the user and a mini model where the agent only fetches or classifies.
Give each team member its own model and let the leader route. Lookups and classification land on a mini model, drafting and analysis on a frontier model, with no router in your code. Add fallback_models for outages.
Yes. Use ollama:<model> for development and the VLLM adapter, or OpenAIChat with a local base_url, in production. The agent’s instructions, tools, and memory stay the same.
Change the model string or class. Instructions, tools, memory, and knowledge stay as they are. Confirm the new model supports the features you use in the compatibility table.
It runs a separate thinking pass before the response model answers. Use it when a task needs planning or analysis but the user still expects a fast reply.
No. Fallbacks wrap the primary model only. reasoning_model, parser_model, and output_model run without fallback.
When the data can’t leave your cloud, yes: serve it with vLLM behind AgentOS. For development, Ollama is enough. Local models are usually less capable than hosted frontier models, so test them on your workload first.
Start from the cheapest model that passes your evals, put reasoning_model in front of it only for tasks that need a thinking pass, turn on session summarization so history stops growing, and read cost per run in AgentOS session metrics rather than guessing from token prices.