https://github.com/taherfattahi/mailtrap-agent
MailTrap Agent with LangChain
https://github.com/taherfattahi/mailtrap-agent
agent langchain llm mailtrap mailtrap-io openai
Last synced: about 1 year ago
JSON representation
MailTrap Agent with LangChain
- Host: GitHub
- URL: https://github.com/taherfattahi/mailtrap-agent
- Owner: taherfattahi
- Created: 2024-04-18T10:43:46.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T11:03:22.000Z (about 2 years ago)
- Last Synced: 2025-03-29T06:11:14.601Z (over 1 year ago)
- Topics: agent, langchain, llm, mailtrap, mailtrap-io, openai
- Language: Python
- Homepage: https://medium.com/@taherfattahi11/building-a-mailtrap-agent-platform-with-agent-tools-in-langchain-cc756073108a
- Size: 43 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MailTrap Agent with LangChain
## Summary
This script serves as a straightforward MailTrap agent designed to interact with the Mailtrap library through prompts.
Example Prompt:
`Please send an email to taherfattahi11@gmail.com with the subject "You are awesome!"
and the body of the email should be: "Congratulations on successfully sending a test email with Mailtrap!"`
- MailTrap (Email Delivery Platform)
- Official Mailtrap Python client
I wrote an article that walks through how to build out the below script Can read that here
## Getting started
Clone the repository, set up the virtual environment, and install the required packages
```
git clone git@github.com:taherfattahi/mailtrap-agent.git
cd mailtrap-agent
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
```
## Store your OpenAI API key
Copy the example env file
`cp .env.example .env`
Now copy your OpenAI API key - mailtrap token - mailtrap sender into the `.env` file, and save the file. It should send up looking something like
`OPENAI_API_KEY=sk-`
`MAILTAP_TOKEN=`
`MAILTAP_SENDER=`
## Start interacting with the agent
Feel free to contribute and implement new tools for this agent.🙂
Press Ctrl + C to exit the chat window at any time.
```python
python3 mailtrap-agent.py
```
