LangChain/Core Concepts
★ OverviewBeginner12 min

What is LangChain?

LangChain is an open-source framework that gives you a unified API over every LLM provider, a composable pipeline system (LCEL), and a middleware layer for agents. This article explains what it is, when it helps, when to skip it, and how the ecosystem fits together.

Quick Reference

  • LangChain = unified interface over LLMs, tools, memory, chains, and middleware
  • LCEL (pipe operator |) composes steps declaratively; streaming and batching work on any chain for free
  • LangChain 1.0 (Oct 2025) was the first stable API; current is 1.2.x
  • Agents in LangChain run on LangGraph under the hood — LangGraph is the execution engine
  • langchain-core provides base interfaces; provider packages (langchain-anthropic, langchain-openai…) implement them
  • Skip LangChain for single-provider apps with simple prompts — direct API is simpler and faster
  • model.profile exposes capabilities (context window, tool calling, vision) sourced from models.dev
  • Never use AgentExecutor or initialize_agent() — deprecated since 0.2, replaced by create_agent()

The One-Line Definition

Definition

LangChain is a framework that gives you a single, unified API to work with any LLM — plus a composable system for building chains, agents, tools, and memory on top of them.

Without LangChain, you write different code for every provider (OpenAI, Anthropic, Gemini…). With LangChain, you write it once and swap models with a single line. That's the core promise: decouple your application logic from the model vendor so you can iterate on prompts, upgrade models, and mix providers without rewriting your stack.