Loading...
Loading...
Compare original and translation side by side
undefinedundefinedundefinedundefinedexport AGENTMAIL_API_KEY=your-api-keyimport { 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 { 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" });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" });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);
}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 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")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")from livekit.agents import Agent
from agentmail_toolkit.livekit import AgentMailToolkit
agent = Agent(
name="Voice Email Agent",
tools=AgentMailToolkit().get_tools(),
)from livekit.agents import Agent
from agentmail_toolkit.livekit import AgentMailToolkit
agent = Agent(
name="Voice Email Agent",
tools=AgentMailToolkit().get_tools(),
)| Tool | Description |
|---|---|
| Create a new email inbox |
| List all inboxes |
| Get inbox details |
| Delete an inbox |
| Send an email |
| Reply to an email |
| List email threads |
| Get thread details |
| Download an attachment |
| Update message labels |
| 工具名称 | 功能描述 |
|---|---|
| 创建新的邮件收件箱 |
| 列出所有收件箱 |
| 获取收件箱详情 |
| 删除收件箱 |
| 发送邮件 |
| 回复邮件 |
| 列出邮件线程 |
| 获取邮件线程详情 |
| 下载附件 |
| 更新邮件标签 |
// TypeScript
const toolkit = new AgentMailToolkit({ apiKey: "your-api-key" });undefined// TypeScript
const toolkit = new AgentMailToolkit({ apiKey: "your-api-key" });undefinedundefinedundefinedundefinedundefined
---
---| Framework | TypeScript Import | Python Import |
|---|---|---|
| Vercel AI SDK | | - |
| LangChain | | |
| Clawdbot | | - |
| OpenAI Agents SDK | - | |
| LiveKit Agents | - | |
| 框架名称 | TypeScript 导入路径 | Python 导入路径 |
|---|---|---|
| Vercel AI SDK | | - |
| LangChain | | |
| Clawdbot | | - |
| OpenAI Agents SDK | - | |
| LiveKit Agents | - | |