LangChain is a Python framework for building apps around an LLM. You've
already sent an API call by hand: build the JSON body, POST it with
curl, then dig the reply out of choices[0].message.content. That works,
but once an app grows you end up writing the same glue over and over -
formatting prompts, calling the API, reading the response, passing the result
into the next step. LangChain wraps that glue so you write less of it.
Three jobs show up in almost every LLM app, and LangChain gives each one a reusable piece:
{topic}, then fill the hole with a real
value each time. No more gluing strings together.For a single one-off request, raw curl or a plain SDK call is simpler - don't
pull in a framework to ask one question. LangChain earns its place when an app
has moving parts: reusable prompt templates, several steps feeding into each
other, or the same call repeated across many inputs. It gives those apps a
common shape so the code stays readable as it grows.
It's a tool on top of the same API you already know. The model, the messages, and the reply haven't changed - LangChain just hides the repetitive wiring. Next you'll see the actual pieces of a chain in code.
Your lab setup
This VM comes preconfigured with your AI keys - just type claude to get started. Your key and URL are already set as $OPENAI_BASE_URL and $OPENAI_API_KEY.