Back to directory

Agents From Scratch

A hands-on guide, in four notebook sections, to building an AI agent from first principles up to an 'ambient' email assistant connected to the Gmail API, covering agent basics, evaluation, human-in-the-loop review and memory.

Agents From Scratch

Agents From Scratch is a guide to building agents from first principles, built up in four sections, each with a notebook and accompanying code, progressing from the basics of an agent through agent evaluation, human-in-the-loop review, and memory. The sections converge on a deployable "ambient" email assistant connected to the Gmail API, and the same underlying principles are meant to carry over to agents for other tasks.

It requires Python 3.11 or later for compatibility with LangGraph, an OpenAI API key, and a LangSmith account and API key for tracing, configured through a local environment file, with dependencies installed through uv or pip in editable mode.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.