Gmail 允许 Agent 与 Gmail 进行交互,从而读取、搜索、发送和管理电子邮件。
Gmail 工具包需要 Google API 客户端库和正确的身份验证设置。安装所需的依赖项:
您还需要设置 Google Cloud 凭据:
参数 | 类型 | 默认值 | 描述 |
---|---|---|---|
get_latest_emails | bool | True | 启用从收件箱检索最新电子邮件 |
get_emails_from_user | bool | True | 启用从特定发件人获取电子邮件 |
get_unread_emails | bool | True | 启用获取未读电子邮件 |
get_starred_emails | bool | True | 启用检索已加星标的电子邮件 |
get_emails_by_context | bool | True | 启用通过上下文搜索电子邮件 |
get_emails_by_date | bool | True | 启用在日期范围内检索电子邮件 |
create_draft_email | bool | True | 启用创建电子邮件草稿 |
send_email | bool | True | 启用立即发送电子邮件 |
search_emails | bool | True | 启用搜索电子邮件 |
函数 | 描述 |
---|---|
get_latest_emails | 从用户收件箱获取最新的 X 封邮件 |
get_emails_from_user | 从特定发件人获取 X 封邮件 |
get_unread_emails | 获取最新的 X 封未读邮件 |
get_starred_emails | 获取 X 封已加星标的邮件 |
get_emails_by_context | 获取匹配特定上下文的 X 封邮件 |
get_emails_by_date | 在特定日期范围内获取邮件 |
create_draft_email | 创建并保存电子邮件草稿 |
send_email | 立即发送电子邮件 |
search_emails | 使用自然语言查询搜索电子邮件 |