- For a Mistral model with generally good performance, look at
mistral.mistral-large-2402-v1:0
. - You can play with Amazon Nova models. Use
amazon.nova-pro-v1:0
for general purpose tasks. - For Claude models, see our Claude integration.
Authentication
For enhanced flexibility, Agno supports multiple authentication configuration mechanisms, including:- Pre-configured boto3 client
- Custom boto3 sessions
- Hardcoded environment variables (credentials stored in environment variables)
AwsBedrock class
TheAwsBedrock
class offers a set of parameters that enable you to interact with the Bedrock Converse API.
Examples
Using Hardcoded environment variables
Set yourAWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
and AWS_REGION
environment variables.
Get your keys from here.
AwsBedrock
with your Agent
:
Using a pre-configured boto3 client or session
To enhance flexibility with boto3 clients, you can instantiate a custom boto3 client configured for thebedrock-runtime
API or a boto3 session and pass it to the AwsBedrock
class.
Passing additional parameters to the Bedrock API
By default, Agno allows you to configure theinferenceConfig
parameter when using the bedrock-runtime
API.
To further customize your requests, you can include additional parameters - such as guardrailConfig
, performanceConfig
, and more - by passing them through the request_params
field in the AwsBedrock
class.
View more examples here.
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
id | str | "mistral.mistral-large-2402-v1:0" | The specific model ID used for generating responses. |
name | str | "AwsBedrock" | The name identifier for the AWS Bedrock agent. |
provider | str | "AwsBedrock" | The provider of the model. |
max_tokens | int | 4096 | The maximum number of tokens to generate in the response. |
temperature | Optional[float] | "None" | The sampling temperature to use, between 0 and 2. Higher values like 0.8 make the output more random, while lower values like 0.2 make it more focused and deterministic. |
top_p | Optional[float] | "None" | The nucleus sampling parameter. The model considers the results of the tokens with top_p probability mass. |
stop_sequences | Optional[List[str]] | "None" | A list of sequences where the API will stop generating further tokens. |
request_params | Optional[Dict[str, Any]] | "None" | Additional parameters for the request, provided as a dictionary. |
client_params | Optional[Dict[str, Any]] | "None" | Additional client parameters for initializing the AwsBedrock client, provided as a dictionary. |
AwsBedrock
is a subclass of the Model class and has access to the same params.