返回顶部
a

agentlair-email

Give your agent a real email address via REST API. Claim @agentlair.dev addresses, send and receive email — no SMTP, no IMAP, no credentials to configure. Free tier includes 50 emails/day. Use when an agent needs to send email, check inbox, or claim an email identity.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
79
下载量
0
收藏
概述
安装方式
版本历史

agentlair-email

# AgentLair Email — REST Email for Agents Give any agent a working email address in 30 seconds. No SMTP setup, no IMAP polling, no credentials to rotate. Just REST. Base URL: `https://agentlair.dev` Auth: `Authorization: Bearer <YOUR_API_KEY>` --- ## Setup: Get an API Key Self-service, no email required: ```bash curl -s -X POST https://agentlair.dev/v1/auth/keys \ -H "Content-Type: application/json" \ -d '{}' ``` Response: ```json {"key": "al_live_...", "tier": "free"} ``` Store the key as `AGENTLAIR_API_KEY` in your environment. All subsequent calls need it in the `Authorization` header. --- ## When to Use This Skill Use this skill when: - An agent needs to send or receive email - You need to claim a dedicated email identity for an agent - You want to check an agent's inbox programmatically - The user asks about agent email, email identity, or sending email as an agent --- ## Claim an Email Address ```bash curl -s -X POST https://agentlair.dev/v1/email/claim \ -H "Authorization: Bearer $AGENTLAIR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"address": "myagent@agentlair.dev"}' ``` Response: ```json {"address": "myagent@agentlair.dev", "claimed": true, "already_owned": false, "account_id": "..."} ``` You can claim multiple addresses per API key. --- ## Send an Email **Important:** Use the `text` field for the message body (not `body` — that returns a `missing_fields` error). ```bash curl -s -X POST https://agentlair.dev/v1/email/send \ -H "Authorization: Bearer $AGENTLAIR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "from": "myagent@agentlair.dev", "to": ["recipient@example.com"], "subject": "Hello from my agent", "text": "Plain text message body." }' ``` Response: ```json {"id": "out_...", "status": "sent", "sent_at": "...", "rate_limit": {"daily_remaining": 49}} ``` Optional fields: - `"html"` — HTML version of the message - `"cc"` — array of CC recipients --- ## Check Inbox ```bash curl -s "https://agentlair.dev/v1/email/inbox?address=myagent@agentlair.dev&limit=10" \ -H "Authorization: Bearer $AGENTLAIR_API_KEY" ``` Response: ```json { "messages": [ { "message_id": "<abc123@host>", "from": "sender@example.com", "subject": "Re: Hello", "received_at": "2026-03-15T...", "read": false } ], "count": 1 } ``` **Note:** `message_id` values include RFC 2822 angle brackets `<...>`. Strip them before using in the read endpoint. --- ## Read a Specific Message Strip `<>` from `message_id`, then URL-encode the `@`: ```bash # message_id from inbox: <abc123@eu-west-1.amazonses.com> # Strip angle brackets, URL-encode @ MSG_ID="abc123%40eu-west-1.amazonses.com" curl -s "https://agentlair.dev/v1/email/messages/$MSG_ID?address=myagent@agentlair.dev" \ -H "Authorization: Bearer $AGENTLAIR_API_KEY" ``` In code: ```javascript const rawId = message.message_id.replace(/^<|>$/g, ""); const encodedId = encodeURIComponent(rawId); const url = `https://agentlair.dev/v1/email/messages/${encodedId}?address=${encodeURIComponent(address)}`; ``` --- ## Check Sent Outbox ```bash curl -s "https://agentlair.dev/v1/email/outbox?limit=5" \ -H "Authorization: Bearer $AGENTLAIR_API_KEY" ``` --- ## Free Tier Limits | Limit | Value | |-------|-------| | Emails per day | 50 | | API requests per day | 100 | | Addresses per key | Unlimited | | Rate limit reset | Midnight UTC | --- ## Delivery Timing - **External recipients:** ~1-2 seconds via Amazon SES - **Intra-domain** (agentlair.dev to agentlair.dev): inbox indexing can take 30-120 seconds after SES receipt - When polling inbox for a just-sent email, use a **120-second timeout minimum** --- ## Example Session **User:** "Send an email to bob@example.com introducing yourself" **Agent actions:** 1. Check if you have an API key. If not, get one: ```bash curl -s -X POST https://agentlair.dev/v1/auth/keys -H "Content-Type: application/json" -d '{}' ``` 2. Claim an address: ```bash curl -s -X POST https://agentlair.dev/v1/email/claim \ -H "Authorization: Bearer $AGENTLAIR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"address": "assistant@agentlair.dev"}' ``` 3. Send the email: ```bash curl -s -X POST https://agentlair.dev/v1/email/send \ -H "Authorization: Bearer $AGENTLAIR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "from": "assistant@agentlair.dev", "to": ["bob@example.com"], "subject": "Hello from your AI assistant", "text": "Hi Bob, I am an AI assistant reaching out to introduce myself. Let me know if you need anything!" }' ``` 4. Confirm to user: "Email sent to bob@example.com from assistant@agentlair.dev" --- ## Notes - Emails delivered via Amazon SES (eu-west-1) with DKIM, SPF, and DMARC authentication - Custom domain support coming Q2 2026 - No data stored beyond delivery — privacy-first design - Built by [AgentLair](https://agentlair.dev) — infrastructure for autonomous agents

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 agentlair-email-1775977750 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 agentlair-email-1775977750 技能

通过命令行安装

skillhub install agentlair-email-1775977750

下载 Zip 包

⬇ 下载 agentlair-email v1.0.0

文件大小: 2.79 KB | 发布时间: 2026-4-13 09:12

v1.0.0 最新 2026-4-13 09:12
Initial release: REST email for agents — claim @agentlair.dev addresses, send, receive, no SMTP/IMAP

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部