Appendix B — The Class Map

Everything this book taught sits inside a much larger API. This appendix maps that surface — the classes LangGraph and LangChain expose — and marks what the book taught, what it merely touched, and what it deliberately left out, with a one-line purpose for the parts you will meet elsewhere.

Two libraries, and the split is the whole mental model — with one wrinkle that the 1.x releases added:

The entire book is one running example of the engine wrapping the capabilities, and the harness is the engine’s own prebuilt loop, viewed from above. The LangChain composition subsystems the book skips (the last section) — LCEL, prompt templates, output parsers and chat memory — keep their primitives in langchain-core; only the chain-era wrappers such as LLMChain and ConversationBufferMemory moved to the older langchain-classic package, which the book’s environment never installs. (Callbacks are the exception among these: the book does build on langchain-core’s callback API in Section 24.6.)

Legend. ✓ taught — a chapter builds on it. ~ touched — used implicitly, named in passing, or shown but never run; not explained as a topic. ○ not covered — the category and what it is for is listed so you know where to go next.

B.1 The map at a glance

The two libraries split into two maps — LangGraph, the orchestration engine, first; then LangChain, the agent harness and the capability layer. Solid = taught (a chapter builds on it), light gray = touched (used implicitly, or named in passing), dashed = not covered (its category and purpose are in the tables below).

%%{init: {'theme':'neutral','themeVariables':{'fontSize':'10px'},'flowchart':{'nodeSpacing':16,'rankSpacing':45,'padding':4}}}%%
flowchart LR
    LG["LangGraph<br/>orchestration"]
    LG --> LGg["Graph and State<br/>StateGraph, MessagesState, add_messages"]:::cov
    LG --> LGc["Control types<br/>Command, Send, Interrupt, Overwrite"]:::cov
    LG --> LGr["Run policies<br/>RetryPolicy, CachePolicy, TimeoutPolicy"]:::cov
    LG --> LGx["Runtime and streaming<br/>Runtime, StreamMode, GraphOutput"]:::cov
    LG --> LGp["Persistence<br/>InMemorySaver, SqliteSaver, AsyncSqliteSaver"]:::cov
    LG --> LGs["Store — long-term<br/>BaseStore, InMemoryStore"]:::cov
    LG --> LGb["Prebuilt<br/>ToolNode, tools_condition, ToolRuntime"]:::cov
    LG --> LGf["Functional API<br/>entrypoint, task"]:::cov
    classDef cov fill:#cfcfcf,stroke:#555,color:#000;

%%{init: {'theme':'neutral','themeVariables':{'fontSize':'10px'},'flowchart':{'nodeSpacing':16,'rankSpacing':45,'padding':4}}}%%
flowchart LR
    LC["LangChain<br/>harness + capabilities"]
    LC --> LCa["Agent harness (langchain 1.x)<br/>create_agent, middleware"]:::cov
    LC --> LCm["Models<br/>BaseChatModel, ChatOpenAI"]:::cov
    LC --> LCe["Messages<br/>Human / AI / System / Tool"]:::cov
    LC --> LCr["Retrieval / RAG<br/>Chroma, OpenAIEmbeddings, Document"]:::cov
    LC --> LCx["Text splitting<br/>Recursive, MarkdownHeader"]:::cov
    LC --> LCmcp["MCP adapters<br/>MultiServerMCPClient"]:::cov
    LC --> LCcb["Callbacks<br/>langchain-core"]:::cov
    LC --> LCt["Tools<br/>@tool then StructuredTool"]:::part
    LC --> LClcel["Runnables / LCEL<br/>langchain-core"]:::skip
    LC --> LCpt["Prompt templates<br/>langchain-core"]:::skip
    LC --> LCop["Output parsers<br/>langchain-core"]:::skip
    LC --> LCmem["Chat memory / history<br/>core + classic"]:::skip
    classDef cov fill:#cfcfcf,stroke:#555,color:#000;
    classDef part fill:#e8e8e8,stroke:#777,color:#000;
    classDef skip fill:#ffffff,stroke:#999,stroke-dasharray:4 3,color:#333;

The shape tells the story. The marks run densest across LangGraph, because orchestration is the subject; they cover the 1.x agent harness as the prebuilt tier of that same engine; and they cover the slice of the capability layer a graph node actually reaches for — models, messages, retrieval, MCP — while leaving the self-contained LangChain composition subsystems for later. “Left out” here means this book does not need them, not that they are all retired: some moved to langchain-classic in the 1.0 split, and the rest are simply a layer a graph node does not reach through.

B.2 LangGraph — the orchestration engine

Graph and state. The builder you assemble, the State it carries, and what a node is handed besides State.

Class Inherits Where / purpose
StateGraph — ✓ Chapter 3 on — the graph builder; .compile() returns the runnable
CompiledStateGraph Pregel ~ what .compile() — and create_agent — yields (Section 13.5); you call .invoke / .stream on it
MessagesState dict ✓ first used in Section 13.4, explained in Section 14.5 — the prebuilt chat State
add_messages (fn) — ✓ Section 14.5 — the merge-by-ID reducer MessagesState is built on
Runtime — ✓ Section 14.8 — a node’s optional second parameter; .context carries per-run dependencies
Pregel PregelProtocol ~ Chapter 15 — the execution engine; CompiledStateGraph is one, so the superstep model describes the object you invoke
MessageGraph StateGraph ○ legacy message-only graph, superseded by MessagesState

Control and signals (langgraph.types). What a node returns to steer the run, and the policies you attach to it.

Class Inherits Where / purpose
Command ToolOutputMixin ✓ Section 10.6, Chapter 9 — set state and route in one return
Send — ✓ Section 10.5 — fan one node out over a list (the map step)
Interrupt — ✓ Chapter 9 — what __interrupt__ holds after interrupt() pauses the run
Overwrite — ✓ Section 10.3 Deep Dive — wrap one write so it skips the key’s reducer
RetryPolicy tuple ✓ Section 21.2 — per-node retry rules
CachePolicy — ✓ Section 21.5 — per-node result memoization
StateSnapshot tuple ✓ Section 8.6, Chapter 26 — what get_state returns (values + next + config)
StreamMode Literal ✓ Chapter 18 Deep Dive — the closed set of seven stream_mode keywords
GraphOutput — ~ Chapter 9, Chapter 18 — the typed (value, interrupts) result of version="v2"; named, not built on
TimeoutPolicy — ✓ Chapter 21 names it; Section 23.5 Deep Dive runs it — the type behind add_node(..., timeout=): run_timeout is a wall-clock cap per attempt, idle_timeout a cap on time without progress. compile() rejects it on a sync node, and on a node that blocks the loop it never fires. Its two companions in Chapter 21 are not types at all: set_node_defaults is a StateGraph method and error_handler= an add_node keyword
RunControl (langgraph.runtime) — ~ Section 22.9 — request a drain to a resumable checkpoint
*StreamPart (Values, Updates, Messages, Custom, …) dict ○ the typed parts stream(version="v2") yields; the book calls them “typed parts” and never names them
TracePolicy — ○ trace-control knob

Persistence (checkpointers). Save and resume a thread.

Class Inherits Where / purpose
BaseCheckpointSaver — ~ the checkpointer interface the concrete savers implement; never named
InMemorySaver (MemorySaver) BaseCheckpointSaver ✓ Section 8.3 — in-process checkpoints, used throughout the graph examples
SqliteSaver BaseCheckpointSaver ✓ Chapter 26 — Chapter 24 opens its tables and exercises recovery; langgraph-checkpoint-sqlite is in the companion requirements
PostgresSaver BaseCheckpointSaver ~ Chapter 8, Chapter 22 — named as the persistent backend for scale; not exercised here (langgraph-checkpoint-postgres)
AsyncSqliteSaver (…sqlite.aio) BaseCheckpointSaver ✓ Chapter 23 — the saver the async door needs, an async context manager; its Challenge keeps a run alive past the request that started it. SqliteSaver raises NotImplementedError under ainvoke; InMemorySaver serves both doors
AsyncPostgresSaver (…postgres.aio) BaseCheckpointSaver ○ the production rung of the same ladder, named in Chapter 23; langgraph-checkpoint-postgres, not installed here
Checkpoint / CheckpointMetadata dict ~ Section 26.3 — the saved snapshot payload and its metadata
JsonPlusSerializer / EncryptedSerializer SerializerProtocol ✓ Chapter 26 — Chapter 24 explains serialization, encryption at rest, and compatibility

Store and prebuilt and functional. Long-term memory, ready-made nodes, and the second authoring style.

Class Inherits Where / purpose
BaseStore / InMemoryStore — / BaseStore ✓ Section 17.7 — cross-thread long-term key/value store
ToolNode RunnableCallable ✓ Section 13.4 — runs the tool calls in an AIMessage
tools_condition (fn) — ✓ Section 13.4 — the “tools, or end?” edge
create_react_agent (fn) — ~ Section 13.5 Deep Dive — the deprecated old name; still imports, superseded by create_agent below
entrypoint / task — ✓ Chapter 15 — the functional-API entry and its memoized steps
ValidationNode RunnableCallable ○ validates tool-call args against schemas before running
InjectedState / InjectedStore InjectedToolArg ○ the older per-argument Annotated route to State or the Store — with get_runtime() and InjectedToolCallId, still supported and unwarned on 1.2.19, but the tools guide now points all four at ToolRuntime instead
ToolRuntime _DirectlyInjectedToolArg ✓ Section 13.6 — state, context, store and stream writer handed to a tool, and kept out of the model’s schema; imported from langchain.tools, which re-exports it from langgraph.prebuilt

B.3 LangChain — the agent harness

langchain.agents (langchain 1.x). The prebuilt tier: the model↔︎tools loop as one call, and the middleware that wraps it. It compiles to a StateGraph, so everything in the LangGraph half — checkpointers, interrupt, streaming — applies unchanged.

Class Inherits Where / purpose
create_agent (fn) — ✓ Section 13.5 — the whole loop in one line; returns a CompiledStateGraph
AgentMiddleware — ✓ Section 19.4 — subclassed to build CallLimitMiddleware by hand
HumanInTheLoopMiddleware AgentMiddleware ✓ Section 19.2 — one line puts an approval gate on a destructive tool
SummarizationMiddleware AgentMiddleware ~ Chapter 17 — compresses history before each model call; the chapter builds its own summarizer
ModelRetryMiddleware / ToolRetryMiddleware / ModelFallbackMiddleware AgentMiddleware ~ Chapter 21 — the harness’s names for the retry and fallback patterns the chapter builds
ModelCallLimitMiddleware / ToolCallLimitMiddleware AgentMiddleware ~ Section 19.4 hand-builds the run-limit half; the shipped pair adds thread limits and exit_behavior
ProviderStrategy / ToolStrategy — ~ Section 12.5 — the two response_format= strategies create_agent picks between
AgentState dict ✓ Section 19.4 — the harness’s default State (messages + structured response); subclassed to add the middleware’s own counter channel
PIIMiddleware, TodoListMiddleware, ContextEditingMiddleware, ShellToolMiddleware, LLMToolSelectorMiddleware, … AgentMiddleware ○ the rest of the shipped middleware: redaction, planning, context editing, sandboxed shells, tool pre-selection

Two of these — AgentMiddleware and HumanInTheLoopMiddleware — are built and run in Chapter 19. The rest are named in a chapter’s closing notes (or the Section 13.5 Deep Dive) as the packaged counterpart of a mechanism the chapter built by hand, never instantiated. That is deliberate: the book teaches the mechanism, and gives you the name to recognize it in the harness.

B.4 LangChain — the capability layer

Models and messages. The thing inside a node, and the turns it reads and writes.

Class Inherits Where / purpose
BaseChatModel BaseLanguageModel ✓ Section 14.8 — the chat interface; typed into the Context so a fake can stand in
ChatOpenAI BaseChatOpenAI ✓ Chapter 12 — the provider client (pointed at the local server)
BaseLanguageModel — ○ the root of the model hierarchy
BaseLLM / LLM / SimpleChatModel BaseLanguageModel (indirect) ○ the completion (non-chat) interface — the book is chat-only. LLM extends BaseLLM; SimpleChatModel hangs off BaseChatModel instead
Human / AI / System / ToolMessage BaseMessage ✓ Chapter 13 — the conversation turn types
RemoveMessage BaseMessage ✓ Chapter 17 — a sentinel that drops messages from State
AIMessageChunk (and *Chunk) AIMessage, … ~ Section 18.4 — the streaming token chunks; consumed, never named
ToolCall, content blocks (Image/Audio/…) dict ○ tool-call payloads; multimodal content — the book is text-only

Tools, retrieval, and the two servers. What a node can call out to — plus the two non-LangChain names a reader will look for here.

Class Inherits Where / purpose
@tool → StructuredTool BaseTool ~ Chapter 13 — @tool is used; the classes are not named
BaseTool / Tool / BaseToolkit varies ○ the tool base (a RunnableSerializable), the single-arg Tool that extends it, and BaseToolkit, a plain BaseModel bundle
MultiServerMCPClient (langchain-mcp-adapters) — ✓ Chapter 25 — turns MCP servers into a tool list the agent can bind
FastMCP (mcp package, not LangChain) — ✓ Section 25.1 — the server side: wrap a capability as tools
FastAPI (fastapi, not LangChain) — ✓ Chapter 22 — the HTTP server a compiled graph is wrapped in
Document BaseMedia ~ Chapter 27 on — what Chroma returns; .page_content is read everywhere, the class never imported (named in Section 28.3)
Embeddings / OpenAIEmbeddings — / Embeddings ○ / ✓ Chapter 27 — the embedding interface (never named) and the client the book runs
VectorStore / Chroma — / VectorStore ~ / ✓ Section 27.2 — the interface (Chapter 27 hand-rolls a tiny VectorStore of its own first) and the concrete store
RecursiveCharacterTextSplitter / CharacterTextSplitter TextSplitter ✓ Chapter 28 — count-based splitters; split_text returns strings
MarkdownHeaderTextSplitter — ✓ Section 28.3 — structural splitter; not a TextSplitter, which is why split_text returns Documents carrying the heading path
BaseRetriever / VectorStoreRetriever — / BaseRetriever ~ the .invoke(query) → [Document] interface; used but not taught — Section 32.7’s variants go through as_retriever(...).invoke(...), everywhere else the book calls .similarity_search directly
BaseDocumentTransformer / BaseDocumentCompressor — ○ post-retrieval transforms: rerank, compress, filter

B.5 What the book deliberately skips — and why: the composition subsystems

These are whole LangChain subsystems the book composes around rather than with. Their primitives live in langchain-core — Runnable, ChatPromptTemplate, StrOutputParser and BaseChatMessageHistory are all core classes. What moved to the older langchain-classic package in 1.x is the chain-era surface built on top of them: LLMChain and the other chains, and the memory wrappers such as ConversationBufferMemory. The book’s environment does not install langchain-classic. Apart from the callback tracer in Section 24.6, no chapter builds on these — a few are named only to explain their absence (PromptTemplate and LCEL, in the Chapter 12 Deep Dive). Each is left out on purpose, because a graph node reaches the same goal a different way — and naming that trade is more useful than a tour.

Subsystem Key classes Why it is skipped If you need it
Runnables / LCEL — in langchain-core Runnable, RunnableLambda, RunnableParallel, RunnablePassthrough, RunnableSequence, RunnableBranch The book composes with graphs, not LCEL’s pipe-operator chain (prompt, then model, then parser). LCEL is the other composition model — clean for a straight line, but a graph is the more honest shape once there are loops and branches. (Chapter 12 names it in passing.) Short linear chains; the pipe operator you will see everywhere in older code.
Prompt templates — in langchain-core ChatPromptTemplate, PromptTemplate, MessagesPlaceholder, FewShotPromptTemplate The book builds prompts with plain f-strings so the moving parts stay visible; the Chapter 12 Deep Dive “where’s PromptTemplate?” makes the case. Reusable, parameterized, or few-shot prompts.
Output parsers — in langchain-core StrOutputParser, PydanticOutputParser, JsonOutputParser, … The book uses with_structured_output() (Section 12.5) — the model returns a typed object directly. Parsers are the older “parse the text yourself” path. A model that can’t do structured output, or an LCEL chain.
LangChain memory — history in langchain-core, wrappers in langchain-classic BaseChatMessageHistory, InMemoryChatMessageHistory, RunnableWithMessageHistory (core); ConversationBufferMemory (classic) Memory here comes from LangGraph checkpointers + Store (Chapter 8, Chapter 17) — durable and thread-scoped. LangChain’s own conversation-memory wrappers, common in LCEL apps.

The pattern under all four: LangChain grew up as a library of chains and helpers, and LangGraph re-answers the same needs — composition, memory, control — with state and edges instead. The 1.x split makes the same judgment official: the chain-era answer moved to langchain-classic, and what langchain itself ships today is an agent harness built on the graph. This book teaches the graph answer. Knowing the other one exists, and what it is called, is enough to cross over when a project asks you to.