Code

cookbook/agent_concepts/tools/email_tools.py
from agno.agent import Agent
from agno.tools.email import EmailTools

receiver_email = "<receiver_email>"
sender_email = "<sender_email>"
sender_name = "<sender_name>"
sender_passkey = "<sender_passkey>"

agent = Agent(
    tools=[
        EmailTools(
            receiver_email=receiver_email,
            sender_email=sender_email,
            sender_name=sender_name,
            sender_passkey=sender_passkey,
        )
    ]
)
agent.print_response("Send an email to <receiver_email>.")

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.

2

Set your email credentials

export SENDER_EMAIL=xxx
export SENDER_PASSKEY=xxx
3

Install libraries

pip install -U agno
4

Run Agent