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"
)