langgraph-email-automation  by kaymen99

AI agents automate customer support emails

Created 2 years ago
258 stars

Top 98.1% on SourcePulse

GitHubView on GitHub
Project Summary

This project addresses the challenge of customer support email overload by automating management, categorization, and response generation using multiple AI agents and Retrieval-Augmented Generation (RAG). It targets businesses seeking to enhance customer communication efficiency and personalization, ultimately improving customer satisfaction by reducing response times and errors.

How It Works

The system leverages Langchain and Langgraph to orchestrate a workflow of specialized AI agents. These agents continuously monitor a Gmail inbox, categorizing incoming emails into predefined types like 'customer complaint,' 'product inquiry,' or 'unrelated.' For inquiries, RAG is employed to fetch accurate information from business documents, enabling the generation of precise responses. Draft emails for complaints and feedback are also generated, with all outgoing communications undergoing an AI-driven quality assurance check for relevance and formatting before being sent.

Quick Start & Requirements

  • Prerequisites: Python 3.7+, Groq API key, Google Gemini API key (for embeddings), Google Gmail API credentials.
  • Installation: Clone the repository, create and activate a Python virtual environment, then run pip install -r requirements.txt.
  • Setup: Configure environment variables in a .env file with MY_EMAIL, GROQ_API_KEY, and GOOGLE_API_KEY. Ensure the Gmail API is enabled and credentials are set up.
  • Running: Execute python main.py to start the email automation workflow. Deploy as an API using python deploy_api.py (accessible at localhost:8000, with docs at /docs and a playground at /playground).
  • Customization: Modify agent logic in Nodes class, adjust prompts in the src/ directory, or add custom data to the data/ folder and rebuild the vector store using python create_index.py.

Highlighted Details

  • AI-powered continuous monitoring and categorization of Gmail inboxes.
  • Automated drafting of personalized email responses for customer complaints and feedback.
  • RAG integration ensures accurate, context-aware answers to product and service inquiries.
  • Built-in AI quality assurance step for all outgoing email drafts.

Maintenance & Community

Contributions are welcomed via GitHub issues or pull requests. Direct contact is available via email at aymenMir1001@gmail.com for questions or suggestions.

Licensing & Compatibility

The provided README does not specify a software license. This lack of explicit licensing information may present compatibility concerns for commercial use or integration into closed-source projects.

Limitations & Caveats

The system's functionality is dependent on the availability and configuration of multiple external APIs (Groq, Google Gemini, Gmail API), requiring users to obtain and manage their own API keys and credentials. The absence of a defined license is a notable caveat for potential adopters, particularly in enterprise environments.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
13 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.