AWS SES

AWSSESTool lets agents send email through Amazon Simple Email Service (SES).

AWSSESTool enables an Agent to send emails using Amazon Simple Email Service (SES).

Prerequisites

The following example requires the boto3 and openai libraries and valid AWS credentials:

uv pip install agno boto3 openai

You must also configure your AWS credentials so that the SDK can authenticate to SES. The easiest way is via the AWS CLI:

aws configure
# OR set environment variables manually
export AWS_ACCESS_KEY_ID=****
export AWS_SECRET_ACCESS_KEY=****
export AWS_DEFAULT_REGION=us-east-1

Make sure to add the domain or email address you want to send FROM (and, if still in sandbox mode, the TO address) to the verified emails in the SES Console.

The Agent model uses an OpenAI key, separately from any toolkit provider credentials.

Set OpenAI Key

Set your OPENAI_API_KEY as an environment variable. You can get one from OpenAI.

export OPENAI_API_KEY=sk-***

Example

The following agent researches the latest AI news and then emails a summary via AWS SES:

aws_ses_tools.py
from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.tools.aws_ses import AWSSESTool
from agno.tools.hackernews import HackerNewsTools

# Configure email settings
sender_email = "verified-sender@example.com"  # Your verified SES email
sender_name = "Sender Name"
region_name = "us-east-1"

agent = Agent(
    name="Research Newsletter Agent",
    model=OpenAIResponses(id="gpt-5.2"),
    tools=[
        AWSSESTool(
            sender_email=sender_email,
            sender_name=sender_name,
            region_name=region_name
        ),
        HackerNewsTools(),
    ],
    markdown=True,
    instructions=[
        "When given a prompt:",
        "1. Extract the recipient's complete email address (e.g. user@domain.com)",
        "2. Research the latest AI developments using HackerNews",
        "3. Compose a concise, engaging email summarising 3 – 4 key developments",
        "4. Send the email using AWS SES via the send_email tool",
    ],
)

agent.print_response(
    "Research recent AI developments in healthcare and email the summary to johndoe@example.com"
)

Toolkit Params

ParameterTypeDefaultDescription
sender_emailstrNoneVerified SES sender address.
sender_namestrNoneDisplay name that appears to recipients.
region_namestr"us-east-1"AWS region where SES is provisioned.
enable_send_emailboolTrueEnable the send_email functionality.
allboolFalseEnable all functionality.

Toolkit Functions

FunctionDescription
send_emailSend a plain-text email. Accepts the arguments: subject, body, receiver_email.

Developer Resources