LangChain Cheat Sheet

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

A single-page index of quick back-links to every page in this sub-section, grouped the same way as the sub-section itself — handy for jumping straight to the topic you need instead of paging through the full navigation. It was written against langchain 1.4.3, langchain-core 1.6.5, langgraph 1.2.12 and langsmith 0.14.1 on Python 3.12, langchain 1.5.14 and @langchain/langgraph 1.4.18 on npm, and LangChain4j 1.20.2 (1.20.2-beta30 for the agentic and MCP modules) on Java 21, all checked on 2026-09-29; the full table is the version baseline on the landing page.

Download the LangChain Cheat Sheet (PDF)

The downloadable PDF is a separate, single A4 page meant for printing. It states the version baseline this sub-section targets and covers:

  • the package-to-import table for LangChain v1;

  • chat-model and structured-output one-liners;

  • the @tool decorator;

  • create_agent and the middleware hooks;

  • a StateGraph skeleton and reducers;

  • checkpointer and store setup;

  • interrupt and Command;

  • the stream modes;

  • the MCP adapter snippet;

  • the LangSmith environment variables and an evaluation snippet;

  • the langgraph CLI;

  • the LangChain4j AiServices, @Tool, memory and agentic equivalents;

  • the LangChain.js equivalents.

Overview — LangChain.

Agents — Agents with create_agent and Middleware.

Other languages — LangChain.js, LangChain4j and LangChain4j Agents & MCP.

References