Skip to main content
Agno’s model abstraction lets you switch providers with one line of code. Every example works with the same Agent interface.
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.models.anthropic import Claude
from agno.models.google import Gemini

# Same agent code, different models
agent = Agent(model=OpenAIResponses(id="gpt-5.2"))
agent = Agent(model=Claude(id="claude-sonnet-4-5"))
agent = Agent(model=Gemini(id="gemini-3-flash-preview"))

Provider Categories

All Providers

ProviderImport
OpenAIfrom agno.models.openai import OpenAIResponses
Anthropicfrom agno.models.anthropic import Claude
Googlefrom agno.models.google import Gemini
xAIfrom agno.models.xai import xAI
Perplexityfrom agno.models.perplexity import Perplexity
Groqfrom agno.models.groq import Groq
DeepSeekfrom agno.models.deepseek import DeepSeek
Mistralfrom agno.models.mistral import MistralChat
Togetherfrom agno.models.together import Together
Fireworksfrom agno.models.fireworks import Fireworks
Coherefrom agno.models.cohere import CohereChat
Cerebrasfrom agno.models.cerebras import Cerebras
Azure OpenAIfrom agno.models.azure import AzureOpenAI
Azure AI Foundryfrom agno.models.azure import AzureAIFoundry
AWS Bedrockfrom agno.models.aws import BedrockChat
Vertex AIfrom agno.models.vertexai import VertexAI
NVIDIAfrom agno.models.nvidia import NVIDIAChat
IBM watsonxfrom agno.models.ibm import WatsonX
Ollamafrom agno.models.ollama import Ollama
vLLMfrom agno.models.vllm import vLLM
LMStudiofrom agno.models.lmstudio import LMStudio
llama.cppfrom agno.models.llamacpp import LlamaCpp
LiteLLMfrom agno.models.litellm import LiteLLM
OpenRouterfrom agno.models.openrouter import OpenRouter
Portkeyfrom agno.models.portkey import Portkey

Quick Start

from agno.agent import Agent
from agno.models.anthropic import Claude

agent = Agent(
    model=Claude(id="claude-sonnet-4-5"),
    instructions=["Be concise"],
    markdown=True,
)

agent.print_response("What is quantum computing?", stream=True)

Run Examples

git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/92_models

# Set API key for your provider
export OPENAI_API_KEY=xxx
export ANTHROPIC_API_KEY=xxx
export GOOGLE_API_KEY=xxx

# Run examples
python openai/responses/basic.py
python anthropic/basic.py
python google/gemini/basic.py
View all examples in the cookbook on GitHub.