Email Adapter
Requires pip install agentix[gateway-email].
The email adapter uses IMAP polling for inbound email and SMTP for outbound replies. It does not use HTTP webhooks.
Setup
from agentix.gateway.adapters.email import EmailAdapter
gateway.add_channel(
EmailAdapter(
email_address="agent@example.com",
email_password="...",
imap_host="imap.gmail.com",
imap_port=993,
poll_interval=30,
smtp_host="smtp.gmail.com",
smtp_port=587,
from_name="Support Agent",
)
)
Optional smtp_user, smtp_password, imap_user, and imap_password override per-protocol logins when they differ from email_address / email_password.
YAML config
channels:
email:
adapter: email
email_address: "${EMAIL_ADDRESS}"
email_password: "${EMAIL_PASSWORD}"
imap_host: imap.gmail.com
imap_port: 993
poll_interval: 30
smtp_host: smtp.gmail.com
smtp_port: 587
from_name: "Support Agent"
Gmail setup
For Gmail, use an App Password instead of your regular password. Enable IMAP in Gmail settings.
Session mapping
Each sender email address maps to a dedicated agent session.