Model Providers

cagent supports multiple AI model providers. Choose the right one for your use case, or use multiple providers in the same configuration.

Supported Providers

Quick Comparison

Provider Key Local? Strengths
OpenAI openai No Broad model selection, tool calling, multimodal
Anthropic anthropic No Strong coding, extended thinking, large context
Google google No Fast inference, competitive pricing, multimodal
AWS Bedrock amazon-bedrock No Enterprise features, multiple models, AWS integration
Docker Model Runner dmr Yes No API costs, data privacy, offline capable

Additional Built-in Providers

cagent also includes built-in aliases for these providers:

Provider API Key Variable
Mistral MISTRAL_API_KEY
xAI (Grok) XAI_API_KEY
Nebius NEBIUS_API_KEY
# Use built-in providers inline
agents:
  root:
    model: mistral/mistral-large-latest
💡 Multi-provider teams

Use expensive models for complex reasoning and cheaper/local models for routine tasks. See the example below.

Using Multiple Providers

Different agents can use different providers in the same configuration:

models:
  claude:
    provider: anthropic
    model: claude-sonnet-4-0
    max_tokens: 64000
  gpt:
    provider: openai
    model: gpt-4o
  local:
    provider: dmr
    model: ai/qwen3

agents:
  root:
    model: claude # coordinator uses Claude
    sub_agents: [coder, helper]
  coder:
    model: gpt # coder uses GPT-4o
  helper:
    model: local # helper runs locally for free