Skip to content

ghudeihed/email_agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email Agent - Ambient Agents with LangGraph

A comprehensive implementation of ambient email agents using LangGraph, demonstrating advanced agent architectures with human-in-the-loop capabilities, memory systems, and production deployment patterns.

Overview

This project implements an intelligent email assistant agent using LangGraph, capable of handling complex email workflows with features like tool calling, evaluations, human-in-the-loop interactions, and persistent memory. The agent is built following best practices for production deployment on the LangGraph Platform.

Features

  • Intelligent Email Processing: Automated email understanding and response generation
  • Tool Integration: Extensible tool system for agent actions
  • Human-in-the-Loop: Interactive workflows with human approval steps
  • Memory Management: Persistent conversation and context memory
  • Production Ready: Deployable on LangGraph Platform with LangGraph Studio support
  • Comprehensive Testing: Built-in evaluation framework for agent performance

Project Structure

email_agent/
├── notebooks/           # Jupyter notebooks for tutorials
│   ├── langgraph_101.ipynb
│   ├── agent.ipynb
│   ├── evaluation.ipynb
│   ├── hitl.ipynb
│   └── memory.ipynb
├── src/
│   └── email_assistant/  # Core agent implementation
├── tests/              # Test suite and evaluations
│   └── test_tools.py
└── README.md

Getting Started

Prerequisites

  • Python 3.8+
  • LangGraph
  • LangChain
  • Jupyter (for notebooks)

Installation

# Clone the repository
git clone https://github.com/langchain-ai/agents-from-scratch.git
cd email_agent

# Install dependencies
pip install -r requirements.txt

Quick Start

  1. Basic LangGraph Introduction:

    jupyter notebook notebooks/langgraph_101.ipynb
  2. Run the Email Assistant:

    from src.email_assistant import EmailAgent
    
    agent = EmailAgent()
    response = agent.process_email(email_content)

Course Modules

1. LangGraph 101

Introduction to LangGraph fundamentals and core concepts.

2. Building Agents

Learn to construct sophisticated agent architectures.

3. Agent Evaluations

Comprehensive evaluation framework for testing agent performance.

4. Human-in-the-Loop (HITL)

Implement interactive workflows with human approval and feedback mechanisms.

  • Notebook: hitl.ipynb
  • LangGraph Studio: src/email_assistant

5. Memory Systems

Build persistent memory and context management for agents.

  • Notebook: memory.ipynb
  • LangGraph Studio: src/email_assistant

6. Deployment

Production deployment strategies using LangGraph Platform.

Running Tests

# Run all tests
pytest tests/

# Run specific test file
pytest tests/test_tools.py

# Run with coverage
pytest --cov=src tests/

LangGraph Studio

To use with LangGraph Studio, open the src/email_assistant directory in the Studio application for visual graph development and debugging.

Documentation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is part of the LangChain educational materials. Please refer to the original repository for license information.

Support

For questions and support, please refer to:

Acknowledgments

This project is based on the "Building Ambient Agents with LangGraph" course from LangChain Academy.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published