agentmail-toolkit by agentmail-to/agentmail-skills
npx skills add https://github.com/agentmail-to/agentmail-skills --skill agentmail-toolkit为热门智能体框架预置的电子邮件工具。即刻为您的智能体添加收件箱管理、发送、接收和邮件自动化功能。
# TypeScript/Node
npm install agentmail-toolkit
# Python
pip install agentmail-toolkit
将您的 API 密钥设置为环境变量:
export AGENTMAIL_API_KEY=your-api-key
从 console.agentmail.to 获取您的 API 密钥。
import { AgentMailToolkit } from "agentmail-toolkit/ai-sdk";
import { streamText } from "ai";
import { openai } from "@ai-sdk/openai";
const toolkit = new AgentMailToolkit();
const result = await streamText({
model: openai("gpt-4o"),
messages,
system: "You are an email agent that can send and receive emails.",
tools: toolkit.getTools(),
});
import { createAgent, HumanMessage, AIMessage } from "langchain";
import { AgentMailToolkit } from "agentmail-toolkit/langchain";
const agent = createAgent({
model: "openai:gpt-4o",
tools: new AgentMailToolkit().getTools(),
systemPrompt: "You are an email agent that can send and receive emails.",
});
const result = await agent.stream({ messages }, { streamMode: "messages" });
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
用于 Clawdbot/Pi Agent 集成。
import { AgentMailToolkit } from "agentmail-toolkit/clawdbot";
const toolkit = new AgentMailToolkit();
const tools = toolkit.getTools();
// Each tool has: name, label, description, parameters, execute
for (const tool of tools) {
agent.registerTool(tool);
}
from agentmail_toolkit.openai import AgentMailToolkit
from agents import Agent
agent = Agent(
name="Email Agent",
instructions="You can send, receive, and manage emails.",
tools=AgentMailToolkit().get_tools(),
)
from langchain.agents import create_agent
from agentmail_toolkit.langchain import AgentMailToolkit
agent = create_agent(
model="gpt-4o",
system_prompt="You are an email agent that can send and receive emails.",
tools=AgentMailToolkit().get_tools(),
)
result = agent.stream({"messages": messages}, stream_mode="messages")
为具备电子邮件功能的语音 AI 智能体提供支持。
from livekit.agents import Agent
from agentmail_toolkit.livekit import AgentMailToolkit
agent = Agent(
name="Voice Email Agent",
tools=AgentMailToolkit().get_tools(),
)
所有框架均可访问以下工具:
| 工具 | 描述 |
|---|---|
create_inbox | 创建新的电子邮件收件箱 |
list_inboxes | 列出所有收件箱 |
get_inbox | 获取收件箱详情 |
delete_inbox | 删除收件箱 |
send_message | 发送电子邮件 |
reply_to_message | 回复电子邮件 |
list_threads | 列出邮件会话 |
get_thread | 获取会话详情 |
get_attachment | 下载附件 |
update_message | 更新邮件标签 |
// TypeScript
const toolkit = new AgentMailToolkit({ apiKey: "your-api-key" });
# Python
toolkit = AgentMailToolkit(api_key="your-api-key")
# Python - 使用现有的 AgentMail 客户端
from agentmail import AgentMail
from agentmail_toolkit.openai import AgentMailToolkit
client = AgentMail(api_key="your-api-key")
toolkit = AgentMailToolkit(client=client)
| 框架 | TypeScript 导入 | Python 导入 |
|---|---|---|
| Vercel AI SDK | from 'agentmail-toolkit/ai-sdk' | - |
| LangChain | from 'agentmail-toolkit/langchain' | from agentmail_toolkit.langchain import AgentMailToolkit |
| Clawdbot | from 'agentmail-toolkit/clawdbot' | - |
| OpenAI Agents SDK | - | from agentmail_toolkit.openai import AgentMailToolkit |
| LiveKit Agents | - | from agentmail_toolkit.livekit import AgentMailToolkit |
每周安装量
46
代码仓库
GitHub 星标数
2
首次出现
2026年1月30日
安全审计
安装于
codex41
opencode41
gemini-cli39
github-copilot36
kimi-cli34
amp34
Pre-built email tools for popular agent frameworks. Instantly add inbox management, sending, receiving, and email automation to your agents.
# TypeScript/Node
npm install agentmail-toolkit
# Python
pip install agentmail-toolkit
Set your API key as an environment variable:
export AGENTMAIL_API_KEY=your-api-key
Get your API key from console.agentmail.to.
import { AgentMailToolkit } from "agentmail-toolkit/ai-sdk";
import { streamText } from "ai";
import { openai } from "@ai-sdk/openai";
const toolkit = new AgentMailToolkit();
const result = await streamText({
model: openai("gpt-4o"),
messages,
system: "You are an email agent that can send and receive emails.",
tools: toolkit.getTools(),
});
import { createAgent, HumanMessage, AIMessage } from "langchain";
import { AgentMailToolkit } from "agentmail-toolkit/langchain";
const agent = createAgent({
model: "openai:gpt-4o",
tools: new AgentMailToolkit().getTools(),
systemPrompt: "You are an email agent that can send and receive emails.",
});
const result = await agent.stream({ messages }, { streamMode: "messages" });
For Clawdbot/Pi Agent integration.
import { AgentMailToolkit } from "agentmail-toolkit/clawdbot";
const toolkit = new AgentMailToolkit();
const tools = toolkit.getTools();
// Each tool has: name, label, description, parameters, execute
for (const tool of tools) {
agent.registerTool(tool);
}
from agentmail_toolkit.openai import AgentMailToolkit
from agents import Agent
agent = Agent(
name="Email Agent",
instructions="You can send, receive, and manage emails.",
tools=AgentMailToolkit().get_tools(),
)
from langchain.agents import create_agent
from agentmail_toolkit.langchain import AgentMailToolkit
agent = create_agent(
model="gpt-4o",
system_prompt="You are an email agent that can send and receive emails.",
tools=AgentMailToolkit().get_tools(),
)
result = agent.stream({"messages": messages}, stream_mode="messages")
For voice AI agents with email capabilities.
from livekit.agents import Agent
from agentmail_toolkit.livekit import AgentMailToolkit
agent = Agent(
name="Voice Email Agent",
tools=AgentMailToolkit().get_tools(),
)
All frameworks get access to these tools:
| Tool | Description |
|---|---|
create_inbox | Create a new email inbox |
list_inboxes | List all inboxes |
get_inbox | Get inbox details |
delete_inbox | Delete an inbox |
send_message | Send an email |
reply_to_message | Reply to an email |
// TypeScript
const toolkit = new AgentMailToolkit({ apiKey: "your-api-key" });
# Python
toolkit = AgentMailToolkit(api_key="your-api-key")
# Python - use existing AgentMail client
from agentmail import AgentMail
from agentmail_toolkit.openai import AgentMailToolkit
client = AgentMail(api_key="your-api-key")
toolkit = AgentMailToolkit(client=client)
| Framework | TypeScript Import | Python Import |
|---|---|---|
| Vercel AI SDK | from 'agentmail-toolkit/ai-sdk' | - |
| LangChain | from 'agentmail-toolkit/langchain' | from agentmail_toolkit.langchain import AgentMailToolkit |
| Clawdbot | from 'agentmail-toolkit/clawdbot' | - |
| OpenAI Agents SDK | - | from agentmail_toolkit.openai import AgentMailToolkit |
Weekly Installs
46
Repository
GitHub Stars
2
First Seen
Jan 30, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykFail
Installed on
codex41
opencode41
gemini-cli39
github-copilot36
kimi-cli34
amp34
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
66,200 周安装
list_threads |
| List email threads |
get_thread | Get thread details |
get_attachment | Download an attachment |
update_message | Update message labels |
| LiveKit Agents | - | from agentmail_toolkit.livekit import AgentMailToolkit |