Part I: LangChain 1.0 and LangGraph 1.0

Part I is about the two libraries most people mean when they say “the LangChain stack”: LangChain 1.0, for wiring language models, prompts, and tools into composable pipelines, and LangGraph 1.0, for turning those pipelines into stateful, durable, multi-step agents. Both shipped in October 2025, both are MIT-licensed, and (this is the whole point of the book) everything in this part runs on your laptop against a local Ollama model, with a hosted model available whenever you want one but never required.

We start with the raw materials. The opening chapter is a one-hour tour of LangChain 1.0: chat models, .invoke / .stream / .batch, prompt templates, the LCEL | operator, output parsers, and tool binding: the six primitives every later chapter is built from. From there we put them to work: retrieval-augmented generation and the handful of retrieval patterns that actually matter in 2026, running local models with Ollama, pulling structured facts and relationships out of free text, and summarizing long documents.

The second half of Part I is LangGraph. Once an application needs to remember things across turns, pause for input, recover from a crash, or coordinate more than one specialist, a linear chain stops being enough and you want a graph. We build up from the four graph primitives, use them to construct a ReAct agent twice (once with the prebuilt factory and once by hand, so you can see exactly what the factory is doing on your behalf), then add the capabilities that separate a script from a service: durable checkpointing that survives process restarts, human-in-the-loop interrupts for actions you do not want an agent taking unsupervised, and the supervisor pattern for routing work across a team of focused agents.

Part I closes with three self-contained applications that combine everything so far: a natural-language query interface over a SQLite database, an agent that answers questions by querying the DBpedia and Wikidata knowledge graphs over SPARQL, and a Perplexity-style local search agent that searches the web, reads the top results, and synthesizes a cited answer in about eighty lines of Python, running entirely on your own hardware.

By the end of Part I you will have the full LangChain and LangGraph vocabulary. Part II covers much of the same design space from LlamaIndex’s point of view; there is nothing here that you will have to unlearn.