LangChain
Most agent code spends its time on plumbing: formatting a prompt, calling a model, parsing what came back, routing a tool call to the right function, retrying when the JSON is malformed. LangChain is the open-source framework that turned that plumbing into named components you assemble rather than rewrite.
What it actually gives you
- A uniform interface over models, so swapping one provider for another is a line of configuration rather than a rewrite.
- Tools: Python or JavaScript functions wrapped with a schema the model can call, plus the glue that routes the call and feeds the result back.
- Retrieval components — loaders, splitters, vector-store adapters — for grounding answers in your own documents.
- A composition layer for chaining those pieces into a pipeline, and a large library of integrations, so the adapter you need already exists.
Where it sits now
LangChain began as a chain library in late 2022 and became the default on-ramp to building with language models. The agent half of it has since moved onto LangGraph, which models the loop as an explicit graph with durable state, leaving LangChain as the component and integration layer underneath. The standing criticism is worth knowing: the abstractions can hide behaviour you need to see, and debugging through several layers is harder than debugging a loop you wrote yourself — a large part of why LangSmith exists.
Why it matters
For an agent, the framework decides how much of the loop you own. LangChain's answer is that the components are standard and replaceable, which gets a working agent running in an afternoon and makes the integration layer someone else's maintenance problem.
LangChain is an open-source framework, in Python and JavaScript, for building applications on language models. It supplies standard components — model interfaces, prompt templates, tool bindings, retrieval and output parsing — plus a large library of integrations, so an application is assembled from parts rather than written against each provider's API. Its agent execution now runs on LangGraph, leaving LangChain as the component and integration layer beneath the loop.
When you build a shed, you do not mill your own screws. You buy standard parts and spend your time on the shed. LangChain is a toolkit of standard parts for building things with AI.
Connecting to an AI model, feeding it your own documents, letting it use a calculator or search the web — these jobs are the same in every project, and LangChain already has pieces for each of them. Developers snap them together instead of writing them from scratch.
That is also the trade-off: ready-made parts save days of work, but when something goes wrong you are looking inside someone else's box to find out why.