An open API service indexing awesome lists of open source software.

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

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
```

![img1.png.png](./img/img1.png)