Skip to main content
Back

LangChain Drops a Free Open-Source Gmail Agent That Learns From Your Corrections

A four-notebook walkthrough that layers triage, evaluation, human review, and long-term memory into a deployable Gmail agent using LangGraph.

Repo, Full Access
  • LangChain released agents-from-scratch, an MIT-licensed guide to building an ambient Gmail agent.
  • Four notebooks progress from basic agent to evaluation, human-in-the-loop, then long-term memory.
  • Uses LangGraph interrupts plus Agent Inbox to review risky tool calls like sending email.
  • Memory layer stores user edits so the agent adapts to preferences over time.
  • Requires Python 3.11+, OpenAI, and LangSmith keys; installs with uv sync --extra dev.
  • Companion free course lives on LangChain Academy.

LangChain has published agents-from-scratch, an MIT-licensed repository that walks through building an ambient email agent layer by layer, from a bare LangGraph workflow up to a deployable Gmail assistant with human approval and persistent memory. It has climbed past 2,100 stars and pairs with a free companion course on LangChain Academy.

Most chat assistants sit idle until you prompt them. Ambient agents flip that model, responding to background signals and pinging you only when they spot an important opportunity or need feedback. Email is the canonical example because the inbox is a constant event stream that most people already spend hours triaging by hand.

What ships in the repo

The material is grouped into four sections, each with a notebook and accompanying code in the src/email_assistant directory. The sections build from agent basics to evaluation, then human-in-the-loop, and finally memory. A short LangGraph 101 notebook covers the primitives first for anyone new to the framework.