Monitor your inbox with IMAP IDLE and trigger the agent on new emails.
[triggers.email] host = "imap.gmail.com" port = 993 username = "you@gmail.com" password = "your-app-password" folder = "INBOX"
Event { source: "email", session_id: "email_trigger", content: "New email from sender@example.com: Subject line here" }
Triggers use a Tokio broadcast channel to deliver events. The agent listens on the receiver end and processes each event as a new message in its own session.
If the IMAP connection drops, aidaemon waits 30 seconds and reconnects automatically.