StudyVisuallyStart studying
AI developers · Part 06

LangChain / LangGraph

Chains, graphs, shared state and checkpoints for multi-step agents.

Last updated

  1. LangChain.jsA toolbox of ready-made parts for LLM apps: model wrappers, document loaders, text splitters, vector stores, retrievers and tools. Full TypeScript, no Python needed.
  2. Chat modelsOne interface for OpenAI, Claude, Gemini and Ollama. Swap the provider without rewriting your calls.
  3. Document loadersReady-made readers for PDFs, web pages, GitHub repos, Notion and more.
  4. Text splittersChunk text smartly, by headings, paragraphs or code functions, with a chosen size and overlap.
  5. RetrieversAn object that answers "give me the top K chunks for this query". It wraps the vector search from Part 5.
  6. tool() with ZodDefine a tool once with a Zod schema. LangChain turns it into the JSON schema the model needs.
  7. LangGraph.jsA framework for building agents as a graph of steps with shared, saved state.
  8. Graph stateData shared by every step in the graph, most often the messages array plus a few fields of your own.
  9. Nodes and edgesNodes are functions that do one step. Edges say which node runs next.
  10. Conditional edgesAn edge that looks at the state and picks the next node, so the model's output can choose the path.
  11. createReactAgentA prebuilt ReAct agent: give it a model and tools, and it runs the loop for you.
  12. CheckpointingLangGraph saves the state after every step (in memory or Postgres). A conversation can resume tomorrow, and a crash doesn't lose progress.
  13. interrupt()Pauses the graph before a risky node. It resumes when the user approves.
  14. When to use whichOne call or simple chat: the raw SDK. RAG pipeline: LangChain. Single-loop agent: a plain loop or createReactAgent. Branches, approvals, memory: LangGraph.