Overview
Tool Name:ago_send_email
This tool allows agents to send emails to users, enabling workflows like sending confirmation emails, documentation, follow-up information, or automated notifications.
Key Features
- HTML and plain text email support
- Template-based emails with variables
- Attachment handling
- Dynamic content with Jinja2 templates
- Integration with AWS SES
- Trigger-based automation support
Prerequisites
AWS SES Requirements
Before using the Send Email tool, you must:- Create an AWS account with SES access
- Verify sender identity (email address or domain)
- Move out of sandbox for production use
- Create IAM credentials with SES permissions
AWS Setup
You need an AWS account with SES (Simple Email Service) configured. Refer to the AWS SES documentation for:- Creating an IAM user with
ses:SendEmailandses:SendRawEmailpermissions - Verifying a sender identity (domain or email address)
- Moving out of the SES sandbox for production use
AGO Configuration
Configure via Admin Interface
- Navigate to Settings → Email Configuration
- Enter your AWS credentials:
- AWS Access Key ID
- AWS Secret Access Key
- AWS Region (e.g.,
eu-central-1)
- Configure email addresses:
- From Address (must be verified in SES)
- Reply-To Address (optional)
- Enable email sending
- Save changes
Configuration Fields
Tool Configuration
Create Email Tool for Agent
- Navigate to AI Studio → Tools
- Click Create Tool
- Select Send Email as the tool type
- Configure the tool settings:
- Name: Internal identifier (e.g., “send_customer_email”)
- Display Name: User-facing name (e.g., “Send Email”)
- Description: What the tool does
- Prompt: When the agent should use this tool
- Define the Input Schema with required fields:
to_email: Email address to send tosubject: Email subject linebody: Email body content (HTML supported)
- Click Save
Assign to Agent
- Navigate to AI Studio → Agents
- Select the agent you want to configure
- Go to the Tools tab
- Add the Send Email tool to the agent’s tool list
- Click Save
Input Schema
Standard Fields
Extended Schema Example
For more complex email workflows, add additional input fields:Email Templates
HTML Template Example
Template Variables
Usage in Conversations
Example Flow
Best Practices for Agents
Include in the agent’s prompt:Trigger-Based Emails
Send automated emails based on events using triggers.Creating Email Triggers
- Navigate to the Triggers configuration
- Click Create Trigger
- Select a trigger event (e.g., “Ticket Created”)
- Add a Send Email action
- Configure the email:
- To: Use template variables like
{{ user.email }} - Subject: Include dynamic data like
Your support ticket #{{ ticket.id }} has been created - Template: Select an email template
- To: Use template variables like
- Enable the trigger and click Save
Available Trigger Events
Deliverability Best Practices
DNS Configuration
Configure these records for better deliverability:SPF Record Example
Content Guidelines
- Clear subject lines: Be specific about email purpose
- Professional formatting: Use consistent branding
- Mobile-friendly: Design for mobile viewing
- Unsubscribe option: Include for marketing emails
- Avoid spam triggers: No excessive caps, punctuation, or spam words
Troubleshooting
Issue: Emails not sending
Issue: Emails not sending
Problem: Tool executes but email never arrives.Solutions:
- Verify email sending is enabled in configuration
- Check AWS credentials are correct
- Verify sender address is verified in SES
- Check SES sending statistics for errors
- Review AWS CloudWatch logs
Issue: Emails going to spam
Issue: Emails going to spam
Problem: Emails arrive in spam folder.Solutions:
- Configure SPF record for your domain
- Set up DKIM signing in SES
- Consider DMARC policy
- Use consistent “From” address
- Avoid spam trigger words
Issue: SES sandbox limitations
Issue: SES sandbox limitations
Problem: Can only send to verified addresses.Solutions:
- Request production access from AWS
- Verify recipient addresses for testing
- Use SES simulator for development
Issue: Rate limit errors
Issue: Rate limit errors
Problem: Receiving throttling errors from SES.Solutions:
- Request sending limit increase from AWS
- Implement exponential backoff
- Queue emails for batch sending
- Monitor sending rate
Issue: AWS credential errors
Issue: AWS credential errors
Problem: Authentication failures with SES.Solutions:
- Verify access key and secret
- Check IAM permissions
- Ensure region matches SES setup
- Regenerate credentials if needed
API Reference
Test Email Configuration
To test your email configuration, use the Test Email button in Settings → Email Configuration. For programmatic access, see:- Public API v1 Reference - Tool management and configuration
Related Documentation
- Tools Description Guide - Best practices for tool descriptions
- Tools Overview - Tool configuration
- Ticket Triggers - Event-based automation
- Agents - Agent configuration
