Show HN: Agent-email-guard – agent tried to send 400 receipts, stopped at 5 gith...

@show

Show HN: Agent-email-guard – agent tried to send 400 receipts, stopped at 5 github.com · 3 points · 1 comments · HN thread

TL;DR AgentiSend open-sourced agent-email-guard (MIT), a blast-radius control layer for AI agents that send email. It enforces per-hour, per-day and per-minute send budgets, refuses near-duplicate and recipient-sweep loops, holds mail to important or new recipients for human approval, and offers a global kill switch, in libraries for Node, Python, PHP and Go. The author's Show HN post used a demo where 400 attempted receipt sends to one customer were cut to 5.

  • Guard sits in front of nodemailer, Amazon SES, Resend, Postmark, any SMTP server, or the AgentiSend API; it returns allow, hold_for_approval or refuse with a stable reason token and the numbers behind the decision.
  • Default loop rule refuses the 4th near-identical send (same To, subject and body at least 0.85 trigram similarity) within 60 minutes; budgets, rate ceilings, approval holds and suppression lists are off until configured.
  • A second default rule refuses sends to an inbox holding at least a third of a 20+ send window when the effective recipient count falls below 3.
  • Kill switch guard.killSwitch.pause(reason) never resumes on a timer.
  • Three enforcement forms: a Claude Code PreToolUse hook, an MCP proxy for Cursor, Codex and Claude Desktop, and an in-process library. The hosted AgentiSend API enforces the same rules server-side, where the agent cannot change them.
  • The four language implementations share one specification and 49 conformance vectors, and can share Redis or Postgres budgets across processes.

Discussion The thread is a single comment from the project's author, who runs AgentiSend, so there is no real back-and-forth yet. The comment explains the motivating failure (retries that change a word and defeat idempotency keys), lists the three enforcement forms, and states the limits openly: the in-process library can be bypassed by code the agent controls, and none of the local forms stop someone holding the provider API key. The tone is informational and asks for reports of missed loops and wrongful blocks.

  • Useful blast-radius control for agents that send email (a few): The only commenter is the author, who presents the tool as a bounded safeguard against retry loops and runaway sends rather than a content filter. No outside commenters have weighed in yet.

#AIagents #email #rateLimiting #opensource #safety