fairlane.systems

LANGCHAIN · TECH

LangChain: the industry default framework for LLM applications, with all strengths and weaknesses

LangChain in May 2026 in v0.4+ is the most-used LLM framework. MIT license, Python and JavaScript, hundreds of integrations. Strong at prototyping, criticised for code quality and stability.

Researched & fact-checked by: · As of: 2026-05

What is LangChain?

LangChain is an open-source framework for building applications with large language models, started in October 2022 by Harrison Chase. In May 2026 in version 0.4+, MIT-licensed, Python and JavaScript as two separate codebases (langchain-python and langchain-js). The commercial backing is LangChain Inc., which offers LangSmith (observability), LangServe (deployment), and LangGraph (workflow orchestration) as paid products.

The framework grew to default choice because it came at the right time. When GPT-3.5 and GPT-4 triggered the LLM wave in 2023, an abstraction layer between application code and LLM API was missing. LangChain filled that gap with Chains (prompt templates with variables), Agents (LLM with tool use), Memory (conversation state), Document Loaders, Text Splitters, Vector Stores, and Retrievers. In May 2026 hundreds of integrations are available – from OpenAI, Anthropic, Mistral through Pinecone, Qdrant, Weaviate, Chroma up to Slack, Notion, Confluence.

Criticism of LangChain in May 2026 is almost as well-known as its popularity. Three points come up regularly. Code quality: many classes, many helper-helper structures, often called "helper hell". A task that takes 10 lines with the OpenAI SDK turns into 50 lines of class wiring in LangChain. Stability: up to v0.2 (mid-2024) every other release brought breaking changes, pushing many production setups into maintenance hell. Since v0.3+ the API is more stable, but trust is damaged. Bloat: the framework tries to cover every imaginable LLM concept, at the cost of depth.

Still, LangChain remains in May 2026 the most-used framework. Over 100,000 GitHub stars, the largest Stack Overflow coverage, the most tutorials and bootcamps. When a developer says "LLM framework", they usually mean LangChain.

Why it matters

For a Swiss SME two questions decide: does LangChain fit my stack, and how high is long-term lock-in risk?

For prototypes and fast learning, LangChain remains in May 2026 a good choice. The community is large, libraries are available, every Stack Overflow question has an answer. A junior developer can build a first RAG system in 2-3 days. For a PoC with 5 client documents and a chat interface that is fully enough.

For production the picture is more complicated. Three problems recur in larger setups. First: version pain. LangChain went from v0.1 to v0.2 renaming fundamental classes, v0.2 to v0.3 redesigning the document-loading model. Anyone current on v0.4+ has two major migrations behind them. v0.5 (somewhere in 2026/2027) will likely bring it again. Second: debug complexity. An error in a chain is often hidden 4-5 classes deep with an unclear stacktrace. Third: performance tuning is hard because many layers sit in between.

For pure RAG pipelines we recommend in May 2026 LlamaIndex instead of LangChain – cleaner code, more stable releases, RAG-specialised. For complex agentic workflows with many tool calls and multi-step logic, LangChain (or LangGraph) still makes sense because the ecosystem is so large. For enterprise compliance, Haystack is the more robust tool.

Key point for CH applications: LangChain offers cloud hosting via LangSmith and LangServe – both are in US cloud. Anyone needing own data in EU/CH runs LangChain themselves (container, own infrastructure) and avoids LangSmith for production tracing. Langfuse (self-host, MIT-licensed) is the tracing alternative.

How it works

LangChain follows a component architecture. The most important concept is the Chain – a pipeline of prompt templates, LLM calls, and output parsers connected via the LCEL (LangChain Expression Language) pipe operator. LCEL became in May 2024 the recommended style, replacing the old class-based Chains.

Example LCEL for a simple RAG pipeline:

from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langchain_core.output_parsers import StrOutputParser from langchain_qdrant import QdrantVectorStore

retriever = QdrantVectorStore(...).as_retriever() prompt = ChatPromptTemplate.from_template("Context: {context}\nQuestion: {question}\nAnswer:") model = ChatOpenAI(model="gpt-4o-mini") parser = StrOutputParser()

chain = ({"context": retriever, "question": lambda x: x} | prompt | model | parser) answer = chain.invoke("What AHV contributions apply in 2026?")

The pipe operator composes components. Each component implements the Runnable interface (invoke, stream, batch, async variants). Streaming is built in, parallel execution via batch.

Agents use the AgentExecutor. Tool definitions are written via decorator or as BaseTool subclasses. The agent receives user input and the tool inventory and decides via LLM which tool to call. In May 2026 LangGraph (see below) is the recommended variant for complex agents – the classic AgentExecutor is marked legacy.

LangGraph is the workflow-orchestration library from LangChain Inc., separately installable (pip install langgraph). Graph-based definition of multi-step agents with branches, loops, human-in-the-loop, and state management. In May 2026 the state of the art for complex LLM agents and the reason LangChain remains the market leader in the agentic space.

Memory is overhauled in May 2026. The old ConversationBufferMemory classes are deprecated; instead state management is recommended in LangGraph, or external storage via Redis/Postgres with own mapping. This change has rendered many tutorials outdated.

LangSmith (commercial, in US cloud) offers tracing, prompt versioning, datasets, evaluations, and annotations. For Swiss applications with client data, LangSmith is problematic due to data residency – alternative: Langfuse (self-host) or own OpenTelemetry solution.

LangChain setup in 5 steps

  1. 01Clarify application type: simple RAG pipeline -> check LlamaIndex, agent with tool use -> LangChain plus LangGraph, enterprise RAG -> check Haystack. Pin version (e.g. langchain==0.4.x).
  2. 02Pick components: ChatModel (OpenAI, Anthropic, Mistral), VectorStore (Qdrant, Chroma, Pinecone), Loader (PyPDF, Docx2txt, Notion), Splitter (RecursiveCharacterTextSplitter). Minimal install instead of pip install langchain[all].
  3. 03Write LCEL pipeline: Prompt -> Model -> Parser via pipe operator. Streaming and batch built in. Async variants for high concurrency.
  4. 04Set up tracing: Langfuse self-host (CH/EU compliance) instead of LangSmith, or OpenTelemetry export to own Grafana. Monitor token usage, latency, errors per chain.
  5. 05Tests: run 30 real example questions from the target domain, manually review answers, measure latency and token usage. Only then go to production.

When to use LangChain

LangChain is the right choice when (a) many integrations are needed, (b) complex agents with multi-step logic are required, or (c) the team already has LangChain experience.

Concrete cases: a marketing bot must combine Slack, Notion, HubSpot, a vector DB, and three LLMs – LangChain has ready integrations for everything, a custom build would take weeks. A consulting workflow runs multi-step (research -> synthesis -> review -> send) with branches per client type – LangGraph is superior here. An onboarding bot for new employees integrates document search, FAQ, appointment booking, and HR system – many tools, LangChain provides the bracket.

For learning projects, LangChain remains a sensible choice due to the large community. Anyone wanting to build LLM-application understanding in 3 months learns LangChain concepts and can later migrate to other frameworks.

When not to use

For pure RAG pipelines without agent complexity, LlamaIndex is the clean choice in May 2026 – clear abstractions, more stable releases, RAG-specialised code.

For small weekend projects or simple prompts, LangChain is over-sized. Direct OpenAI library call (10 lines of Python) is shorter, faster, less lock-in.

For enterprise compliance with high stability demand, Haystack is the more robust choice – deepset offers commercial support, the pipeline concept is more clearly documented.

For production with critical latency requirements LangChain can be a performance killer – many layers between LLM call and answer. Direct call with a light own abstraction is often faster.

For Swiss German voice agents, LangChain is not central – the pipeline consists of STT (Whisper), LLM (direct), TTS (ElevenLabs), and telephony (Twilio). LangChain would only add artificial complexity.

If LangSmith as tracing service is desired but data must stay in EU/CH: not possible, because LangSmith is US-cloud-only. Use Langfuse as self-host alternative.

For teams without Python depth, LangChain is a learning curve – the class hierarchy and concepts (Chains, Runnables, RunnableParallel, RunnableLambda) take weeks to become intuitive.

Trade-offs

STRENGTHS

  • Largest ecosystem in the LLM space with hundreds of integrations
  • LangGraph as state of the art for complex multi-step agents
  • Best Stack Overflow coverage and community tutorials
  • Python and JavaScript as equally strong codebases

WEAKNESSES

  • Code quality criticised – many layers, helper hell
  • Version stability historically weak, migration effort every 6-12 months
  • LangSmith as tracing service in US cloud, unsuitable for CH/EU data
  • Performance overhead through many abstraction layers

FAQ

Is LangChain still worth it in May 2026?

Conditional. For complex agents with many tools and multi-step logic: yes, especially with LangGraph. For pure RAG pipelines: LlamaIndex is cleaner. For simple prompts: direct OpenAI library call. Pragmatically: the right tool for the use case, not LangChain as default.

How painful are version upgrades?

Up to v0.3 very painful (breaking changes every 6 months). Since v0.3+ in May 2024 the core API is more stable, but sub-packages (langchain-community, langchain-experimental) keep changing. Pragmatic: pin version, review upgrade plan quarterly, major-version switch only with migration test.

LangChain or LangGraph?

LangGraph for complex multi-step agents with state, branches, loops, human-in-the-loop. LangChain (LCEL chains) for simple pipelines without state. In May 2026 LangGraph is the recommended path for all agentic workflows, the classic AgentExecutor is legacy.

Related topics

RAG FRAMEWORKS · TOOL COMPARISONRAG frameworks compared: LangChain, LlamaIndex, Haystack, DSPy, Semantic Kernel, txtai, RAGFlow, Verba, Flowise, LangflowLLAMAINDEX · TECHLlamaIndex: the clean RAG framework for code-first teamsHAYSTACK · TECHHaystack: the enterprise RAG framework from deepset in BerlinDSPY · TECHDSPy: programming instead of prompting – the Stanford approach to LLM pipelinesRAGFLOW · TECHRAGFlow: the self-hostable all-in-one RAG system with web UIRAG ON YOUR OWN KNOWLEDGE · SERVICERAG on your own knowledge: answers from your documents – with sources, not made upROUTING · AI CONCEPTMulti-LLM routing: which model when, for how much

Sources

  1. langchain-ai/langchain – GitHub repository and changelog · 2026-05
  2. LangChain documentation – LCEL, agents, integrations · 2026-05
  3. LangGraph documentation – graph-based agent orchestration · 2026-04
  4. LangChain blog – version migration and roadmap notes · 2026-03

FITS YOUR STACK?

What this looks like in your business – a 30-minute intro call.

Book a call