thrd: 为 AI 智能体提供安全的托管电子邮件 - Openclaw Skills

作者:互联网

2026-03-26

AI教程

什么是 thrd: AI 智能体专用电子邮箱收件箱?

thrd 技能通过 thrd.email 为 AI 智能体提供了一个强大的基础设施,使其能够通过电子邮件进行通信。与需要连接敏感的个人或公司账户的传统设置不同,此技能允许即时配置特定于智能体的隔离收件箱。它通过受策略门控的出站控制、幂等发送以及 API 密钥在本地磁盘上的零持久性策略来确保安全性。

将其与 Openclaw Skills 集成,可以使您的智能体自主处理专业通信、新闻通讯和验证流程。它包括用于验证的人工声明(Human Claiming)和防止垃圾邮件的推理证明(Proof of Reasoning)挑战等功能,使其成为 AI 驱动的外联和收件箱管理的专业级解决方案。

下载入口:https://github.com/openclaw/skills/tree/main/skills/sergiorico1/thrd

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install thrd

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 thrd。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

thrd: AI 智能体专用电子邮箱收件箱 应用场景

  • 为客户支持 AI 智能体配置专用身份。
  • 通过推理证明(Proof of Reasoning)处理冷启动外联活动,以保持较高的发件人信誉。
  • 通过 X 等社交平台的人工声明验证 AI 智能体身份。
  • 安全地处理入站邮件,而不暴露开发者的主邮箱。
  • 在 Openclaw Skills 环境中自动化基于电子邮件的工作流。
thrd: AI 智能体专用电子邮箱收件箱 工作原理
  1. 通过入职脚本配置一个新的、隔离的电子邮件地址和身份,无需初始 API 密钥。
  2. 在运行时的秘密管理器中设置 THRD_API_KEY 环境变量,以启用安全通信。
  3. 同步最新的 OpenAPI 合约,以确保智能体理解当前的 API 功能和版本。
  4. 使用 Webhook 驱动的唤醒策略或本地长轮询守护程序轮询入站消息。
  5. 执行幂等回复或新的出站消息,必要时通过推理证明等安全检查。
  6. 通过内置的管理工具监控投递状态、信任分数和每月使用配额。

thrd: AI 智能体专用电子邮箱收件箱 配置指南

要开始使用此技能,请按照以下安装步骤操作:

# 安装所需的 Python 依赖项
pip install -r requirements.txt

# 配置一个新的电子邮件账户和身份
python3 scripts/onboard.py --agent-name "My Agent" --reveal-api-key

# 安全地设置您的 API 密钥环境变量
export THRD_API_KEY="your_redacted_key"

# 同步 OpenAPI 合约以初始化环境
python3 scripts/openapi_sync.py

thrd: AI 智能体专用电子邮箱收件箱 数据架构与分类体系

该技能使用以下结构管理身份和状态:

组件 描述
收件箱数据 包含智能体名称、租户名称和分配的电子邮件地址的 JSON 负载。
API 合约 本地存储的带有 ETag 验证的缓存 OpenAPI 文档。
身份验证 THRD_API_KEY 环境变量(从不持久化到磁盘)。
状态跟踪 轮询守护程序用于跟踪消息偏移量的 .thrd_cursor 文件。
安全令牌 用于验证流程的短效 security_ack_tokenpor_token
name: thrd
description: "Provision a dedicated inbox for your AI agent and manage email safely via thrd.email. Includes instant onboarding, inbound polling, reply/send (idempotent + policy-gated), Proof of Reasoning for cold outbound, Human Claiming for verification, and trust/delivery tracking. Does not persist API keys to disk."
metadata:
  {
    "openclaw":
      {
        "emoji": "??",
        "requires": { "bins": ["python3"], "env": ["THRD_API_KEY"] },
        "install":
          [
            {
              "id": "pip",
              "kind": "exec",
              "command": "pip install -r requirements.txt",
              "label": "Install Python dependencies",
            },
          ],
      },
  }

Thrd Email Skill

This skill helps you create and operate an isolated inbox for an AI agent using thrd.email, without connecting your personal inbox.

Safety by default: don't connect your primary inbox to an agent; use a dedicated agent inbox.

Workflows

To avoid stale assumptions, refresh the OpenAPI contract and read info.version:

python3 scripts/openapi_sync.py
python3 scripts/openapi_sync.py --print-version

This uses HTTP cache validators (ETag/Last-Modified) and only re-downloads when changed.

Provision a New Email Account

To create a new email account, run the onboarding script:

python3 scripts/onboard.py --agent-name "My Agent" [--tenant-name "My Company"]

This prints a JSON payload to stdout with the new inbox data and a redacted API key by default.

If you explicitly need the one-time raw key in a trusted terminal:

python3 scripts/onboard.py --agent-name "My Agent" --reveal-api-key

Security note: Do not write your API key to disk. Store it in your runtime's secret manager and set THRD_API_KEY as an environment variable. (The rest of the tools require THRD_API_KEY; onboarding does not.)

Upgrade Plan (Billing)

To start paid billing for your current tenant, use the checkout script:

python3 scripts/checkout.py 

Plans:

  • sandbox -> Sandbox Starter (9 EUR/month, raises Tier 1 monthly limit from 100 to 2,000 emails)
  • limited -> Tier 2
  • verified -> Tier 3

Forward the resulting Stripe URL to your human owner for payment.

Human Claiming (Verification)

Tier 3 (Verified Outbound) requires a responsible human linked via X.

  • Start the flow: POST /v1/claim/x/start
  • Forward the claim_url to your human owner.
  • Check status: GET /v1/claim/x/status

Proof of Reasoning (PoR)

Cold outbound (Tier 3) may require a reasoning challenge to prevent spam.

  • If you receive a 428 por_required error, solve the logical challenge provided in the response.
  • Re-send the request with por_token and por_answer.

Manage Emails and Track Delivery

For detailed API usage (polling, sending, replying, trust scores, and checking delivery status), see references/api.md. Note: replies use reply-all behavior by default: they preserve historical CC and keep recipients from the latest inbound To line so participants are not dropped. Tier2+ may add CC via cc[]. In Tier1, cc[] may only contain addresses already present in that thread's CC history. Security note: when Prompt Shield marks an inbound email as high-risk, Tier2/3 flows may require creating a short-lived security_ack_token (POST /v1/security/ack) before reply/send. Quota note: use GET /v1/usage to monitor monthly usage (used, remaining, state, reset_at) and avoid hitting hard limits mid-run.

Many LLM runtimes do not reliably maintain background polling. Use wake webhooks when possible:

  • Configure webhook: PUT /v1/wake/webhook
  • Read status: GET /v1/wake/webhook
  • Disable webhook: DELETE /v1/wake/webhook

THRD sends signed inbox.pending pings, then your runtime should immediately pull with GET /v1/events and ACK.

Fallback when webhooks are not available:

python3 scripts/poll_daemon.py --cursor-file .thrd_cursor

This keeps pull-based delivery alive without requiring a public webhook endpoint.

Tools

  • scripts/onboard.py: Instant provisioning of a new email inbox.
  • scripts/checkout.py: Generate a Stripe Checkout URL for upgrades.
  • scripts/openapi_sync.py: Refresh/cache latest OpenAPI and read current info.version.
  • scripts/poll_daemon.py: Fallback long-poll daemon for runtimes without wake webhook support.

相关推荐