← all repositories
langchain-ai/agents-from-scratch

Build an email agent with memory, evals, and a human brake pedal

A progressive tutorial that uses an email assistant as the proving ground for the messy, production-grade parts of agent development.

2k stars Jupyter Notebook Agents
agents-from-scratch
Velocity · 7d
+1.9
★ / day
Trend
cooling
star history

What it does

This repository is a guided workshop for building an email assistant with LangGraph. It starts with a basic agent that triages and drafts responses, then layers in evaluation, human approval for sensitive tool calls, and long-term memory that persists across sessions. The end state is an “ambient” agent meant to integrate with the Gmail API, though the notebooks rely on mock tools.

The interesting bit

Most agent tutorials celebrate the spark of automation; this one lingers on the plumbing. It treats evaluation, human-in-the-loop safety checks, and memory as core requirements rather than afterthoughts, using a boring-but-real domain—email—as the stress test.

Key highlights

  • Four progressive notebooks: basic agent, evaluation, human-in-the-loop, and memory.
  • Evaluation harness using Pytest, LangSmith, and LLM-as-a-judge to grade responses and triage decisions.
  • Human-in-the-loop interrupts for high-stakes actions like sending mail or scheduling meetings, surfaced through the Agent Inbox interface.
  • Long-term memory via LangGraph Store so the assistant adapts to user preferences over time.
  • Optional live Gmail integration and deployment path to LangGraph Platform.

Caveats

  • Notebooks use mock email and calendar tools; wiring up live Gmail requires separate API credential setup.
  • The automated test suite explicitly targets the basic email_assistant, while the HITL and memory variants are explored primarily in notebooks.
  • Future integration with LangMem is noted but not yet implemented, so memory management may evolve.

Verdict

Worth a weekend if you’re moving past prototype agents and need to see how evaluation, safety rails, and memory fit together. Skip it if you want a drop-in email client or a framework-agnostic guide.

Frequently asked

What is langchain-ai/agents-from-scratch?
A progressive tutorial that uses an email assistant as the proving ground for the messy, production-grade parts of agent development.
Is agents-from-scratch open source?
Yes — langchain-ai/agents-from-scratch is open source, released under the MIT license.
What language is agents-from-scratch written in?
langchain-ai/agents-from-scratch is primarily written in Jupyter Notebook.
How popular is agents-from-scratch?
langchain-ai/agents-from-scratch has 2k stars on GitHub and is currently cooling off.
Where can I find agents-from-scratch?
langchain-ai/agents-from-scratch is on GitHub at https://github.com/langchain-ai/agents-from-scratch.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.