Connect Your AI Agent
Connecting your AI agent to Sluice takes about 2 minutes. You have two options:
- REST API — Send emails programmatically via HTTP. See the REST API quickstart for a full walkthrough.
- SMTP — Update your agent's SMTP configuration to point at Sluice (detailed below). No code changes beyond host/port/credentials.
This page covers the SMTP integration path.
What you need
- Your Sluice SMTP credentials (from the dashboard or your onboarding email)
- Access to your AI agent's SMTP configuration
SMTP settings
| Setting | Value |
|---|---|
| Host | Your Sluice instance hostname |
| Port | 587 (STARTTLS) or 465 (implicit TLS) |
| Username | Your organization's email address |
| Password | Your Sluice SMTP password |
| Encryption | TLS required — plaintext connections are rejected |
Sluice supports PLAIN and LOGIN authentication methods, which are compatible with virtually every SMTP client library.
Before and after
The only thing that changes is where your agent sends email. Instead of connecting directly to Gmail, SendGrid, or your email provider, your agent connects to Sluice. Sluice handles forwarding approved emails through your provider.
Language and framework examples
Python
Using smtplib (standard library)
Using aiosmtplib (async)
Node.js
Using Nodemailer
Go
Ruby
Credential management
- SMTP passwords are cryptographically random 32-character strings
- Passwords are hashed before storage — Sluice never stores plaintext credentials
- You can regenerate your password from Settings > Inbound SMTP at any time (this revokes all previous credentials immediately)
- Keep your SMTP password in a secrets manager or environment variable — don't hardcode it
Compatibility
Sluice speaks standard SMTP. If your agent can send email, it can use Sluice. This includes:
- Any programming language with an SMTP library
- AI agent frameworks (OpenAI Agents, LangChain, CrewAI, AutoGen, Semantic Kernel)
- Automation platforms (n8n, Make, Zapier, Power Automate)
- Custom applications and microservices
See the AI agent examples guide for step-by-step instructions for specific platforms.