# When to use which

One call or simple chat: the raw SDK. RAG pipeline: LangChain. Single-loop agent: a plain loop or createReactAgent. Branches, approvals, memory: LangGraph.

AI developers · Part 06: LangChain / LangGraph · Card 14 of 14 · Last updated 2026-10-13

## Analogy

You don't need Kubernetes for a static site. Pick the lightest tool that handles the job.

## In an agent

The common criticism is that LangChain hides what's happening. Your answer: you built the raw loop first, so you know what it abstracts.

## 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

### When should I use the raw SDK, LangChain or LangGraph?

Use the raw SDK for one call or a simple chat. Use LangChain for a RAG pipeline with loaders, splitters and retrievers. Use a plain loop or createReactAgent for a single-loop agent. Use LangGraph when you need branches, approvals, memory across sessions or crash recovery.

### How do I answer the interview criticism that LangChain hides too much?

Agree that abstractions hide details, then say you built the raw loop first, so you know exactly what the framework does underneath. You use it for the boring parts like loaders and checkpoints, and you can drop to the raw SDK when you need control. That answer shows judgement, not loyalty to a tool.

## Related concepts

- [LangChain.js](https://studyvisually.com/learn/tech/ai-developers/langchain-langgraph/langchain)
- [LangGraph.js](https://studyvisually.com/learn/tech/ai-developers/langchain-langgraph/langgraph)
- [Chat models](https://studyvisually.com/learn/tech/ai-developers/langchain-langgraph/chat-models)
- [Document loaders](https://studyvisually.com/learn/tech/ai-developers/langchain-langgraph/document-loaders)

Web page: https://studyvisually.com/learn/tech/ai-developers/langchain-langgraph/when-to-use-frameworks
Study this card in the app: https://studyvisually.com/app/learn?category=ai-developers&card=when-to-use-frameworks
