docs/guides/email-ai-agent.md
This guide turns nanobot into an email AI agent that polls IMAP for accepted messages and replies through SMTP.
config.jsonnanobot agent -m "Hello!"
python -m pip install nanobot-ai
nanobot onboard --wizard
Merge this snippet into ~/.nanobot/config.json and replace the addresses and
passwords:
{
"channels": {
"email": {
"enabled": true,
"consentGranted": true,
"imapHost": "imap.gmail.com",
"imapPort": 993,
"imapUsername": "[email protected]",
"imapPassword": "your-app-password",
"smtpHost": "smtp.gmail.com",
"smtpPort": 587,
"smtpUsername": "[email protected]",
"smtpPassword": "your-app-password",
"fromAddress": "[email protected]",
"allowFrom": ["[email protected]"],
"autoReplyEnabled": true
}
}
}
nanobot channels status
nanobot gateway
Send an email from an address in allowFrom to the bot mailbox. Keep the
gateway running long enough for the polling interval to receive it.
consentGranted to false to fully disable mailbox access.allowFrom narrow; ["*"] accepts mail
from anyone.autoReplyEnabled, SMTP settings,
and allowed sender addresses.allowedAttachmentTypes, size limits, and
gateway logs.