Add AgentMail as an alternative email provider - #8
Open
adi-singh13 wants to merge 1 commit into
Open
Conversation
Adds AgentMail (https://agentmail.to) as an optional email provider alongside the existing Gmail API integration. Users can switch between providers by setting the EMAIL_PROVIDER environment variable. Changes: - Add src/tools/AgentMailTools.py with full AgentMail SDK integration - Update src/nodes.py with a factory function to select email provider - Update README.md with AgentMail setup instructions AgentMail offers a simpler setup (API key only, no OAuth) which can be useful for quick prototyping or environments where Gmail OAuth is inconvenient.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds AgentMail as an optional alternative email provider alongside the existing Gmail API integration. The goal is to give users more flexibility — especially those who want a quicker setup without OAuth.
Changes
src/tools/AgentMailTools.py— New email tools class implementing the same interface asGmailToolsClass, using the AgentMail Python SDKsrc/nodes.py— Added a factory function that selects the email provider based on theEMAIL_PROVIDERenvironment variable (gmailby default,agentmailas an option)README.md— Added setup instructions for the AgentMail optionHow it works
Users set
EMAIL_PROVIDER=agentmailin their.envfile along withAGENTMAIL_API_KEYandAGENTMAIL_INBOX_ID. The existing Gmail flow remains the default and is completely unchanged.Why AgentMail?
credentials.jsonortoken.jsonneededThis is a non-breaking, additive change. The default behavior (Gmail API) is untouched.