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.
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.
- 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
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
- Python 3.8+
- LangGraph
- LangChain
- Jupyter (for notebooks)
# Clone the repository
git clone https://github.com/langchain-ai/agents-from-scratch.git
cd email_agent
# Install dependencies
pip install -r requirements.txt-
Basic LangGraph Introduction:
jupyter notebook notebooks/langgraph_101.ipynb
-
Run the Email Assistant:
from src.email_assistant import EmailAgent agent = EmailAgent() response = agent.process_email(email_content)
Introduction to LangGraph fundamentals and core concepts.
- Notebook:
langgraph_101.ipynb - Resources: Course Slides (PDF)
- LangGraph Studio:
src/email_assistant
Learn to construct sophisticated agent architectures.
- Notebook:
agent.ipynb - Resources: Course Slides (PDF)
- LangGraph Studio:
src/email_assistant
Comprehensive evaluation framework for testing agent performance.
- Notebook:
evaluation.ipynb - Test Suite:
tests/test_tools.py - Resources: Course Slides (PDF)
Implement interactive workflows with human approval and feedback mechanisms.
- Notebook:
hitl.ipynb - LangGraph Studio:
src/email_assistant
Build persistent memory and context management for agents.
- Notebook:
memory.ipynb - LangGraph Studio:
src/email_assistant
Production deployment strategies using LangGraph Platform.
- Documentation:
- LangGraph Studio:
src/email_assistant
# Run all tests
pytest tests/
# Run specific test file
pytest tests/test_tools.py
# Run with coverage
pytest --cov=src tests/To use with LangGraph Studio, open the src/email_assistant directory in the Studio application for visual graph development and debugging.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is part of the LangChain educational materials. Please refer to the original repository for license information.
For questions and support, please refer to:
This project is based on the "Building Ambient Agents with LangGraph" course from LangChain Academy.