ResendTools 使 Agent 能够使用 Resend 发送电子邮件。
先决条件
以下示例需要 resend
库和来自 Resend 的 API 密钥。
export RESEND_API_KEY=***
以下 Agent 将使用 Resend 发送电子邮件
cookbook/tools/resend_tools.py
from agno.agent import Agent
from agno.tools.resend import ResendTools
from_email = "<enter_from_email>"
to_email = "<enter_to_email>"
agent = Agent(tools=[ResendTools(from_email=from_email)], show_tool_calls=True)
agent.print_response(f"Send an email to {to_email} greeting them with hello world")
参数 | 类型 | 默认 | 说明 |
---|
api_key | str | - | 用于身份验证的 API 密钥。 |
from_email | str | - | 在电子邮件通信中用作发件人的电子邮件地址。 |
函数 | 说明 |
---|
send_email | 使用 Resend API 发送电子邮件。 |
开发者资源
Responses are generated using AI and may contain mistakes.