StudyVisuallyStart studying
Part 06 · LangChain / LangGraph · Card 1 of 14

LangChain.js

A toolbox of ready-made parts for LLM apps: model wrappers, document loaders, text splitters, vector stores, retrievers and tools. Full TypeScript, no Python needed.

Last updated

Analogy

If the OpenAI SDK is fetch, LangChain is Express plus a big bag of middleware packages.

In an agent

Use it for the RAG plumbing so your agent code stays about decisions, not glue.

Practice

Interview questions

  • Why LangChain / LangGraph, and why not?
    • LangChain saves boilerplate for RAG: loaders, splitters, retrievers.
    • LangGraph gives state, checkpoints, interrupts and routing for complex agents.
    • For simple cases, skip them and use the SDK directly to avoid needless abstraction.

Questions people ask

What is LangChain.js used for?

LangChain.js is a TypeScript toolbox of ready-made parts for LLM apps: model wrappers, document loaders, text splitters, vector stores, retrievers and tools. It is most useful for RAG plumbing, so your own agent code can stay focused on decisions instead of glue code. No Python is needed.

Is LangChain worth using, or should I use the raw SDK?

For a single call or a simple chat, the raw SDK is enough and easier to read. LangChain pays off when you need loaders, splitters and retrievers for RAG, or want to switch model providers. The usual criticism is that it hides what happens, which matters less once you have written the raw version.