集成

AgentSend works with any AI agent framework. Use the REST API directly or follow one of the framework-specific guides below.

概述

AgentSend exposes a simple REST API, so it fits naturally into any agent stack. Whether you're building with a high-level orchestration framework or calling the API by hand, the same primitives apply: create an inbox, send a message, read replies.

All integrations use the same underlying REST API. Framework-specific guides just show you how to wire it in idiomatically for each tool.

框架集成

选择您的框架获取分步指南,包括工具定义、示例智能体和 webhook 处理。

直接 API

对于上面未列出的任何框架,直接调用 REST API。每种有 HTTP 客户端的语言都可以直接使用。

javascript — fetch
await fetch(`https://api.agentsend.io/inboxes/${inboxId}/messages`, {
  method: "POST",
  headers: {
    "x-api-key": process.env.AGENTSEND_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    to: ["user@example.com"],
    subject: "Hello from my agent",
    bodyText: "This was sent by an AI agent via AgentSend.",
  }),
});
bash — curl
curl -X POST https://api.agentsend.io/inboxes/$INBOX_ID/messages \
  -H "x-api-key: $AGENTSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["user@example.com"],
    "subject": "Hello from my agent",
    "bodyText": "This was sent by an AI agent via AgentSend."
  }'

See the API Reference for the full list of endpoints, request schemas, and response examples.

Claude Code 与 Cursor

AgentSend exposes a /skill endpoint for MCP tool integration. Add it to your mcp_servers config and Claude Code or Cursor will automatically discover send_email, list_messages, and reply_to_thread as callable tools.

json — .claude/mcp_servers.json
{
  "mcpServers": {
    "agentsend": {
      "command": "npx",
      "args": ["agentsend-mcp"],
      "env": {
        "AGENTSEND_API_KEY": "your-api-key",
        "AGENTSEND_INBOX_ID": "your-inbox-id"
      }
    }
  }
}
💡

For a full walkthrough of the MCP setup, see the Claude MCP integration guide.

社区

在未列出的框架中使用 AgentSend?我们很乐意看到。在我们的 Discord 上分享您的集成,我们会将其收录到文档中。

加入 AgentSend Discord →