agentmail-toolkit
БесплатноБез исполняемых скриптовНе проверенAdd AgentMail tools to agent frameworks with the TypeScript or Python AgentMail Toolkit. Use for Vercel AI SDK, LangChain, OpenAI Agents SDK, LiveKit Agents…
от agentmail-to★ 27 звёзд на GitHubОб этом скилле
AgentMail Toolkit
Install the toolkit for the selected language and set AGENTMAIL_API_KEY.
npm install agentmail-toolkit
pip install agentmail-toolkit
The TypeScript and Python packages can expose different tool sets and can release on different schedules. Discover the installed package's tool catalog at runtime instead of trusting a hardcoded list:
new AgentMailToolkit().getTools().map((tool) => tool.name)
[tool.name for tool in AgentMailToolkit().get_tools()]
TypeScript
Vercel AI SDK
import { openai } from "@ai-sdk/openai";
import { streamText } from "ai";
import { AgentMailToolkit } from "agentmail-toolkit/ai-sdk";
const toolkit = new AgentMailToolkit();
const result = await streamText({
model: openai(process.env.OPENAI_MODEL!),
messages,
system: "Use email tools only when the user authorizes the external action.",
tools: toolkit.getTools(),
});
LangChain
import { createAgent } from "langchain";
import { AgentMailToolkit } from "agentmail-toolkit/langchain";
const agent = createAgent({
model: process.env.LANGCHAIN_MODEL!,
tools: new AgentMailToolkit().getTools(),
systemPrompt: "Use email tools only when the user authorizes the external action.",
});
MCP server tools
import { AgentMailToolkit } from "agentmail-toolkit/mcp";
const tools = new AgentMailToolkit().getTools();
Each tool provides a name, title, description, input schema, output schema, callback, and complete annotations for registration on your own MCP server. On a successful call the MCP adapter returns structuredContent (validated against the output schema) alongside the JSON text block; on failure it returns an isError result. The Python package does not ship an MCP adapter.
Existing client
import { AgentMailClient } from "agentmail";
import { AgentMailToolkit } from "agentmail-toolkit/ai-sdk";
const client = new AgentMailClient({ apiKey: process.env.AGENTMAIL_API_KEY });
const toolkit = new AgentMailToolkit(client);
The toolkit constructor takes an existing SDK client as its only argument — it does not accept an { apiKey } options object directly. Construct the SDK client first, then pass it in.
Python
OpenAI Agents SDK
from agentmail_toolkit.openai import AgentMailToolkit
from agents import Agent
agent = Agent(
name="Email Agent",
instructions="Use email tools only when the user authorizes the external action.",
tools=AgentMailToolkit().get_tools(),
)
Existing client
from agentmail import AgentMail
from agentmail_toolkit.openai import AgentMailToolkit
client = AgentMail()
toolkit = AgentMailToolkit(client=client)
The toolkit constructor takes an existing SDK client as its only argument — it does not accept an api_key option directly. Construct the SDK client first, then pass it in.
LangChain
import os
from agentmail_toolkit.langchain import AgentMailToolkit
from langchain.agents import create_agent
agent = create_agent(
model=os.environ["LANGCHAIN_MODEL"],
tools=AgentMailToolkit().get_tools(),
system_prompt="Use email tools only when the user authorizes the external action.",
)
LiveKit Agents
from agentmail import AgentMail
from agentmail_toolkit.livekit import AgentMailToolkit
from livekit.agents import Agent
class EmailAssistant(Agent):
def __init__(self) -> None:
client = AgentMail()
super().__init__(
instructions="Handle email only when explicitly requested.",
tools=AgentMailToolkit(client=client).get_tools(),
)
Subclass the LiveKit Agent and pass instructions and toolkit tools through super().__init__.
Results and errors
Requires toolkit TypeScript >= 0.5.0 or Python >= 0.3.0.
- Every tool declares an output schema. MCP tool calls return validated
structuredContentplus a matching JSON text block on success; void operations (deletes) return a stable{ success: true }object. - A failed tool call is signaled through each framework's native error channel, not as a successful result. The Vercel AI SDK, LangChain, and clawdbot adapters (and the generic export) throw on failure — surfacing a distinct tool-error the model can tell apart from a normal result — and the MCP adapter returns
isError: true. Do not treat a returned value as an error string; catch the thrown error or checkisError. - Error messages are concise and bounded (the API's own reason, not a raw SDK dump).
Framework summary
| Framework | TypeScript Import | Python Import |
|---|---|---|
| Vercel AI SDK | from 'agentmail-toolkit/ai-sdk' |
- |
| LangChain |
Установить agentmail-toolkit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл agentmail-toolkit?
Add AgentMail tools to agent frameworks with the TypeScript or Python AgentMail Toolkit. Use for Vercel AI SDK, LangChain, OpenAI Agents SDK, LiveKit Agents, or MCP adapters; do not use for direct mailbox operations, raw SDK implementation, CLI usage, or MCP client setup.
Как установить скилл agentmail-toolkit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agentmail-toolkit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic