A smart, production-ready email assistant built using LangGraph and integrated with Gmail and Google Calendar via Auth0. This assistant is designed to simplify email workflows by:
- Classifying incoming emails as: (respond, ignore, notify)
- Drafting responses to emails intelligently
- Scheduling meetings with context from the conversation
- Remembering cross-thread context using semantic long-term memory
- Fully secure with Google OAuth authentication through Auth0

- ✅ Real-time email classification
- ✅ Smart response drafting
- ✅ Meeting scheduling via Google Calendar
- ✅ Semantic memory for contextual awareness across threads
- ✅ Can handle user commands like sending emails, retrieving the last sent email, and more
- 🔜 Future: Episodic and procedural memory integration for even more personalized, adaptive behavior
Below are example images of the email assistant in action:




The LangGraph-powered assistant uses a graph-based architecture to manage its workflow. Key components include:
- This node is responsible for detecting if the input is related to a received email or a general user request.
- If it detects a received email, it forwards it to the Triage Router Node.
- If it detects a simple request (like asking for the last sent email or sending a new email), it forwards it directly to the React Agent.
- This node is responsible for deciding what to do with each incoming email.
- Based on the email's content and metadata, it routes the message to one of three paths:
Respond
Ignore
Notify
- If the Triage Router decides the assistant should respond, it forwards the email to a React Agent.
- This agent composes a reply by analyzing context, thread history, and memory.
- It is also capable of handling various user requests, such as:
- Sending an email to a specified recipient
- Telling the user the last email they sent
- Summarizing recent conversations
- And much more
📸 Check the image below to visualize the flow inside LangGraph Studio.

-
Install
uv
package manager:pip install uv
Follow these steps to get the project running locally:
-
Clone the repository:
git clone https://github.com/your-username/langgraph-email-assistant.git cd langgraph-email-assistant
-
Create your environment file:
cp .env.example .env
Update it with your Auth0, Gmail, and Calendar credentials.
-
Set up the virtual environment:
a. Create and activate the environment:
uv venv source .venv/bin/activate
b. Install dependencies:
uv run
-
Run the LangGraph development server:
uv pip install "langgraph-cli[inmem]" uv run langgraph dev
To enable Gmail and Calendar integration, you’ll need to set up your OAuth credentials. Follow this tutorial to create your credentials.json
and token.json
:
Once created, place them in:
src/agent/credentials/
We're planning to enhance the assistant's memory using:
- Stores experiences and sequences from previous tasks
- Enables the assistant to "recall how" it performed a task
- Supports few-shot learning for behavior adaptation
- Encodes rules and routines the assistant follows
- Typically lives in code, prompt templates, or configurations
- Provides consistency across sessions
Just like humans remember both how to ride a bike (procedural) and a memorable bike ride (episodic), our assistant will evolve to remember both the rules and experiences to be more helpful.
Open to ideas, improvements, and feature suggestions. Feel free to fork and submit a PR!
MIT License – see LICENSE
for details.