Skip to main content
Agno provides a convenient string syntax for specifying models using the provider:model_id format. This approach reduces code verbosity by eliminating the need to import model classes while maintaining full functionality. Both the traditional object syntax and the string syntax are equally valid and work identically. Choose the approach that best fits your coding style and requirements.

Format

The string format follows this pattern:
  • provider: The model provider name (case-insensitive)
  • model_id: The specific model identifier
Examples:
  • "openai:gpt-4o"
  • "anthropic:claude-sonnet-4-20250514"
  • "google:gemini-2.0-flash-exp"
  • "groq:llama-3.3-70b-versatile"

Basic Usage

Agent with String Syntax

Teams with String Syntax

Use model strings with Teams for coordinated multi-agent workflows:

Multiple Model Types

Agents support different models for various purposes:

Common Providers

ProviderString FormatExample
OpenAIopenai:model_id"openai:gpt-4o"
Anthropicanthropic:model_id"anthropic:claude-sonnet-4-20250514"
Googlegoogle:model_id"google:gemini-2.0-flash-exp"
Groqgroq:model_id"groq:llama-3.3-70b-versatile"
Ollamaollama:model_id"ollama:llama3.2"
Azure AI Foundryazure-ai-foundry:model_id"azure-ai-foundry:gpt-4o"
Mistralmistral:model_id"mistral:mistral-large-latest"
LiteLLMlitellm:model_id"litellm:gpt-4o"
OpenRouteropenrouter:model_id"openrouter:anthropic/claude-3.5-sonnet"
Togethertogether:model_id"together:meta-llama/Llama-3-70b-chat-hf"
For the complete list and provider-specific documentation, see the Models Overview.

Developer Resources