Skip to content
LangChain & LangGraph OrchestrationPython & TypeScript Tool Calling

Production email tool calling for LangChain agents with built-in security guardrails

Turn email sending into a reliable, typed tool for autonomous LangChain and LangGraph workflows. Prevent prompt injection, looping blasts, and data exfiltration with native security gates and approval modes.

3,000 emails/month freeZero credit card requiredSub-20ms edge latency
202 Accepted
Tool Latency
Queued durably before any provider call
Py & TS
Framework Support
LangChain & LangGraph
6,000
Free Monthly Tier
Custom domain DKIM
Developer Ergonomics

Drop into your application in under 60 seconds

Native typed interfaces with zero unnecessary dependencies. Built for standard fetch and modern edge runtimes.

$pip install sadasend langchain
langchain_sadasend_tool.py
python
PYTHON
import os
from langchain.tools import tool
from sadasend import SadaSend

client = SadaSend(api_key=os.environ["SADASEND_API_KEY"])

@tool
def send_transactional_email(to: str, subject: str, html: str) -> str:
    """Send an authenticated transactional email to a customer.
    Args:
        to: Recipient email address
        subject: Email subject line
        html: Email body in HTML format
    """
    response = client.emails.send(
        from_email="assistant@yourdomain.com",
        to=to,
        subject=subject,
        html=html,
        tags=["langchain-agent"]
    )
    return f"Email dispatched successfully. Message ID: {response.id}"

Custom LangChain tool decorated with @tool for seamless agent tool calling with structured arguments and error handling.

Core Infrastructure

Engineered for high deliverability and zero incident risk

Every layer from edge connection pooling to per-key rate limits is designed to keep critical transactional dispatches fast, reliable, and contained.

Native Python & TypeScript Tooling

Drop directly into LangChain AgentExecutor or LangGraph StateGraph with fully typed Pydantic input schemas.

Prompt Injection Defense

Per-key recipient domain restrictions prevent compromised LLMs from emailing attacker-controlled drop addresses.

Velocity Tripwire Ceilings

Hard velocity tripwires stop run-away reasoning chains from dispatching thousands of repetitive messages.

Human-in-the-Loop Review State

Integrate with LangGraph interrupt mechanisms to route sensitive email drafts to human operators for approval.

Delivery Telemetry & Webhooks

Track open and bounce events with webhooks that feed back into your agent memory and state store.

6,000 Free Monthly Sends

Build and deploy production LangChain prototypes with custom domain DKIM and 6,000 free sends every month.

Architectural Comparison

SadaSend vs Generic REST APIs in LangChain

Why LangChain developers use SadaSend rather than wiring generic email endpoints without safety controls.

Feature & CapabilitySadaSendGeneric REST APIs in LangChain
Dedicated AI Agent Safety ControlsNone (Unrestricted blast radius)
Hourly Send Velocity CeilingsNo runaway loop defense
Edge-Enforced Domain AllowlistsClient-side only (Bypassed by LLM)
Human Approval Queue IntegrationMust build manual review queue
Python & TypeScript SDK Parity
Free Tier with Custom Domain6,000 sends foreverTrial expiration or credit card
Forever Free Tier
Transparent Economics

Start with 3,000 emails every month at zero cost

No artificial paywalls on security. Unlike legacy providers that reserve recipient allowlists or dedicated IP pools for high enterprise tiers, every SadaSend account receives full safety controls from day one.

3,000 dispatches monthly forever with zero credit card
All safety gates, allowlists, and velocity limits included
Scale seamlessly: Starter ($12/mo for 10k), Pro ($19/mo for 50k), Scale ($79/mo for 250k)
Free Developer Plan
$0 / mo

No credit card required

Create Free AccountCompare all paid plan tiers
Frequently Asked Questions

Everything you need to know about LangChain email API

Clear, transparent answers on deliverability, API authentication, and rate limits.

You can add the send_transactional_email tool to your tool node in LangGraph. For high-stakes emails, use LangGraph interrupts or SadaSend approval mode to pause execution until human verification.
Technical Deep Dives

Related developer guides and architectural tutorials

Explore step-by-step production implementation blueprints, benchmarks, and protocols.

Documentation

AI coding agent rules (AGENTS.md, Cursor, Claude)

Setup instructions and rule files for AI coding agents: AGENTS.md, .cursorrules, CLAUDE.md, and hosted MCP configuration.

Read guide
Documentation

REST API Reference & Endpoints

Complete REST API reference for sending emails, managing API keys, tracking delivery events, and configuring recipient allowlists with low latency.

Read guide
Documentation

Model Context Protocol (MCP) Server

Connect AI agents directly to SadaSend via Model Context Protocol (MCP). Inspect tools, configure execution scopes, and enable human approval holds.

Read guide
Deep Dive3 min read

LangChain Email Tool Calling: Safe Integration with Recipient Allowlists

Connecting LangChain agents to raw SMTP credentials risks uncontrolled outbound email. Here is the architectural guide to building safe email tools using Pydantic schemas and scoped credentials.

Read tutorial
Deep Dive3 min read

CrewAI Email Dispatcher Agent: Multi-Agent Workflows with Human Sign-Off

CrewAI lets multi-agent swarms collaborate on complex tasks. Learn how to isolate email sending into a dedicated role with human approval gates.

Read tutorial
Deep Dive5 min read

Preventing Infinite Email Loops in Autonomous AI Agents: Circuit Breakers and Token Buckets

When two autonomous email agents start talking to each other, they can trigger an infinite email loop in minutes. Here is how to engineer circuit breakers, token buckets, and idempotency safeguards.

Read tutorial
Deep Dive5 min read

What actually happens when you give an AI agent your email API key

Every email MCP server on the market hands your agent the full platform. That is a capability claim with no control story — and it is the reason your engineering lead keeps saying no.

Read tutorial