Skip to main content
Claude is a family of foundational AI models by Anthropic that can be used in a variety of applications. See their model comparisons here. We recommend experimenting to find the best-suited model for your use-case. Here are some general recommendations:
  • claude-sonnet-4-20250514 model is good for most use-cases and supports image input.
  • claude-opus-4-1-20250805 model is their best model.
  • claude-3-5-haiku-20241022 model is their fastest model.
Anthropic has rate limits on their APIs. See the docs for more information.
Claude API expects a max_tokens param to be sent with each request. Unless set as a param, Agno will default to 8192. See the docs for more information.

Authentication

Set your ANTHROPIC_API_KEY environment. You can get one from Anthropic here.

Example

Use Claude with your Agent:

Beta Features

You can use Anthropic’s beta features with Agno by setting the betas parameter:
Read more about beta features with Agno Claude model here.

Prompt caching

You can enable system prompt caching by setting cache_system_prompt to True:
Read more about prompt caching with Agno’s Claude model here.

Structured Outputs

Structured outputs are used to ensure that the model’s response matches a defined schema. This is useful to eliminate issues like missing fields or invalid values. Use it for production systems that need reliable, consistent responses in a specific format. Agno uses Claude’s native support for structured outputs. This feature is available for claude-sonnet-4-5-20250929 and all newer models. See Anthropic’s structured outputs documentation for more details.
Read more about structured outputs with Agno’s Claude model:

Params

Claude is a subclass of the Model class and has access to the same params.