Run enterprise grade agent systems in your cloud with the AgentOS. Join the waitlist.
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>.")
Create a virtual environment
Terminal
and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
Set your API key
export OPENAI_API_KEY=xxx
Set your email credentials
export SENDER_EMAIL=xxx
export SENDER_PASSKEY=xxx
Install libraries
pip install -U openai agno
Run Agent
python cookbook/tools/email_tools.py
Was this page helpful?