Email agent

From elophanto/EloPhanto · View interactive version

Email agent is an AI agent skill from the GitHub repository elophanto/EloPhanto. Manage the agent's email inbox — create inboxes, send/receive/reply to emails,

How to use this skill

Skill file

Email Agent

Description

Manage the agent's email inbox — create inboxes, send/receive/reply to emails,

search messages, and handle verification flows for service signups.

Supports two providers: AgentMail (cloud API) and SMTP/IMAP (your own server).

Triggers

Instructions

Provider Awareness

EloPhanto supports two email providers:

All 6 email tools work identically regardless of provider. Key differences:

Key Behaviors

  1. First-time setup — If any email tool returns a "credentials not found"

error, handle it conversationally:

(from https://console.agentmail.to), store with vault_set agentmail_api_key.

store with vault_set smtp_username, vault_set smtp_password, etc.

  1. Check if you have an inbox first — Use identity_status to check

if you already have an email address in your beliefs before creating a

new one. Only call email_create_inbox if no inbox exists.

  1. Service signups — When signing up for a service:
  1. Sending emails — Use email_send for new messages. Be professional

and concise. Never include internal system details, vault credentials,

or private keys in outbound emails.

  1. Responding to emails — Use email_reply to maintain threading.

Always quote relevant context. Use reply_all only when all recipients

need to see the response.

  1. Checking inbox — Use email_list to see recent messages. Use

email_read for full content of a specific message.

  1. Searching — Use email_search with natural language queries.

Examples: "verification emails", "invoices from last week",

"messages from support@hetzner.com".

  1. Never share credentials — API keys and passwords are in the vault.

Only share your inbox address when needed for signups or communication.

Common Workflows

First-Time Setup (AgentMail)
User: "get me an email"
  → Present both providers (AgentMail vs SMTP), ask preference
  → User chooses AgentMail
  → Ask for API key (point to https://console.agentmail.to)
  → vault_set agentmail_api_key <user's key>
  → email_create_inbox → new address created
  → Tell user their new email address
First-Time Setup (SMTP)
User: "use my Gmail for email"
  → Ask for SMTP/IMAP details (host, port, credentials)
  → vault_set smtp_username <email>
  → vault_set smtp_password <app password>
  → Update config.yaml with server details
  → email_create_inbox → verifies connection
  → Tell user their email is verified and ready
Verification Flow
email_create_inbox (if needed)
  → browser: navigate to signup page
  → browser: fill form with agent email
  → browser: submit form
  → email_list (poll with retries for verification email)
  → email_read (extract verification link)
  → browser: navigate to verification link
  → identity_update (store new account)
Invoice Handling
email_list (check for invoice emails)
  → email_read (get invoice details/attachment)
  → document_analyze (parse invoice PDF if attached)
  → payment_preview (show cost)
  → payment_process / crypto_transfer (pay with approval)
  → email_reply (confirm payment)

Verify

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.