🚀 Introduction
Imagine you could just tell an AI assistant to “email my colleague about the rescheduled meeting” — and it just… does it. No switching apps, no typing out messages, no messing with SMTP configs. Just one command, and boom — your email is written, sent, and confirmed.
Well, that's exactly what I built.
Using Fetch.ai's autonomous agents, a secure SMTP handling layer, and ASI-1, I created a system where users can send real emails simply by talking to an AI assistant. Here’s how it works, why it matters, and how you can deploy your own.
💡 The Idea
We all use AI to write emails, but we still have to copy them, paste them, and manually send them. That’s where this system flips the script.
Instead of stopping at "generate email text", we automate the entire flow:
You tell the LLM what you want to email and to whom.
The LLM structures the request.
An autonomous agent (that you own) sends the email for you.
You get a success message — and that’s it.
Simple. Clean. Zero manual steps.
🛠️ The Stack
Fetch.ai Autonomous Agents – For persistent, decentralized execution.
Python SMTP Handling – To send real emails from your own email provider.
LLM (ASI) – As the user interface and reasoning engine.
Secure Agent Secrets – So SMTP credentials stay private.
🔄 The Architecture
Here's how it flows:
You deploy your own SMTP Agent (based on a public template).
You add your SMTP credentials in the Agent's secure secrets (never exposed).
When it starts, your agent connects to a Manager Agent.
The Manager registers your agent and links it with your email identity.
Now, the LLM knows which agent to send your requests to!
Then, you simply tell the LLM:
“Send an email to
john@example.com
fromme@gmail.com
, sayingthank you for the help in the project
with the passwordtest password
.”
The LLM turns this into a structured request → forwards it to your SMTP agent → and the agent securely sends the email.
🎯 What the user provides:
sender
: Your email address.recipients
: Comma-separated list of recipients.subject
: Subject of the email.body
orhtml
: Plain text or HTML content.password
: A hashed version of your password for security.
🔐 Security First
No raw SMTP credentials are passed through the LLM. Everything is handled agent-side, with credentials stored in environment variables (Agent Secrets
) and encrypted communications. The LLM only triggers the action — your agent does the rest, in your control.
📦 Features
✅ Send plain-text or HTML emails
🔒 Secure password verification
🔁 Agent reconnect logic on interval
📡 Automatic linking to Manager Agent
🧠 LLM-native usage with minimal prompt
🧪 Example Use Case
You’re running a small startup. You deploy your SMTP agent once.
Then, every time you need to send an email, you just tell your AI:
“Email my cofounder with subject ‘Budget’ and say ‘Please check the Q2 numbers’.”
The AI writes the mail, sends it via your agent, and confirms it — instantly.
🌍 Why This Matters
This setup makes AI truly actionable. We’ve gone from “AI can help you write emails” to “AI can send your emails, securely, on your behalf.” And because each agent is private and decentralized, this scales naturally, securely, and personally.
✨ Conclusion
This project is a small step for email, but a huge leap for AI autonomy. When LLMs can act safely, securely, and meaningfully through agents — the future becomes really exciting.
Let me know if you want help deploying your own SMTP agent!
Ping me on GitHub, LinkedIn, or Twitter.