Agents From Scratch is an intelligent assistant designed to streamline your inbox management. It analyzes incoming messages to determine the appropriate next step—whether that involves a quick reply or a calendar invitation—and drafts a response accordingly. Crucially, the assistant does not send messages autonomously. Every outgoing action is held in a queue for your personal review and approval. An advanced, memory-enhanced version of the system learns from your past decisions, eventually mirroring how you interact with specific senders and topics.
What It Does
Environment Setup
Python Version
This project requires Python 3.11 or newer to ensure full compatibility with LangGraph. You can verify your current version by running:
python3 --version
API Keys
Environment Variables
Create a .env file in the root directory of the project:
cp .env.example .env
Open the .env file and input your credentials:
LANGSMITH_API_KEY=your_langsmith_api_key
LANGSMITH_TRACING=true
LANGSMITH_PROJECT="interrupt-workshop"
OPENAI_API_KEY=your_openai_api_key
Alternatively, you can export these variables directly in your terminal:
export LANGSMITH_API_KEY=your_langsmith_api_key
export LANGSMITH_TRACING=true
export OPENAI_API_KEY=your_openai_api_key
Package Installation
For faster and more consistent dependency management, it is recommended to use uv. If you haven't installed it yet, run:
pip install uv
Next, synchronize the project dependencies:
uv sync --extra dev
Activate the virtual environment:
source .venv/bin/activate
If you prefer using standard pip, follow these steps:
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
pip install -e .
Completing the installation step is essential. The package is registered as interrupt_workshop, but it uses the import name email_assistant. This configuration allows you to import modules from email_assistant throughout any part of the project.
Connecting the API
Gmail Integration and Deployment
Refer to the Gmail Tools README for detailed setup instructions. That guide will walk you through creating Google API credentials and explains the process for deploying the graph to the LangGraph platform. The complete implementation for Gmail-specific functions is located in src/email_assistant/email_assistant_hitl_memory_gmail.py.
Running Tests
The repository includes an automated test suite. These tests utilize LangSmith to evaluate the assistant's tool usage and the overall quality of its replies.
Run All Tests
python tests/run_all_tests.py
Test Results
Detailed logs will be available in LangSmith under the project name defined in your .env file (LANGSMITH_PROJECT). Within the LangSmith interface, you can:
Available Test Implementations
email_assistant: The baseline email helper configuration.Testing Notebooks
To verify that all project notebooks execute correctly without errors, run:
python tests/test_notebooks.py
Alternatively, you can use pytest:
pytest tests/test_notebooks.py -v
Mantis: A Smarter Vision-Language-Action Model for Robots
ETF Grid Trading Strategy Design Tool: Smart Parameters & Risk Control
Fast RAG: Deploy a Private Hybrid Search RAG Stack Locally
AIPy: Execute Python via Natural Language Directly in Your Terminal
Yazi: A High-Performance Terminal File Manager Built in Rust
AI Interactive Fiction Generator Builds Stories You Actually Control
Scira: The Minimalist AI Search Engine for Grok, Claude, and Beyond
MaskSearch: Training LLMs for Expert-Level Search Capabilities
Weapp-QRCode: Generating QR Codes in WeChat Mini Programs
AppFlowy: Open-Source Notion Alternative With Local Data Control
Notes: An Open-Source C++ Markdown App with Kanban Support
PDF to Scanned Look Instantly – No Scanner Required