# LangChain

> Canonical: https://skillalmanac.com/glossary/langchain | Last verified: 2026-11-23 | Index status: not offered to search engines

LangChain is an open-source framework for building applications that use language models. It gives developers a common interface to many model providers and building blocks for tools, memory and agents.

Also called: lang chain, langchain ai, what is langchain, LangChain framework, LangChain Python, LangChain agents.

## In plain language

LangChain is a software toolkit that programmers use to build apps on top of AI models. Instead of writing separate code for each AI provider, a developer uses one common interface and can switch models with little change. It also supplies ready-made parts for giving a model tools, such as search, and for building agents. A typical use is a chatbot that answers questions about a company's documents. LangChain is one product among several, and it is not the AI model itself. Because it sits between your code and the model, it adds a layer to learn and to debug, and the project's design has changed over time, so tutorials can go out of date.

## Technical definition

LangChain is a Python and JavaScript library. Its documentation describes an agent framework built around a create_agent function, a configurable harness for the prompt, tools and middleware around a model loop, plus a standard interface for chat models and embeddings across providers. Its agents are built on LangGraph, a separate low-level runtime that models workflows as graphs of shared state, nodes and edges and provides durable execution, persistence and human-in-the-loop pauses. LangSmith, a related product, handles tracing and evaluation. IBM reports the project was launched by Harrison Chase in October 2022.

## How it shows up when you use agents

You meet LangChain in tutorials, in company codebases and in job descriptions. If you ask a coding agent to work on a project that imports it, the agent has to read that project's version of the library, because the documentation describes how the project is organised today and older tutorials may not match. Related pieces carry their own names: LangGraph for stateful workflows, and LangSmith for tracing and evaluation.

What breaks when this is misunderstood: people treat LangChain as the AI, or as a required step. It is a library, and the model, the [embedding](/glossary/embedding) store and the prompts are separate parts. Another failure is copying a snippet from an old tutorial and finding that the function no longer exists. A third is blaming the model for a fault that sits in the framework's configuration. Anthropic's guidance on agents notes that frameworks can obscure prompts and responses.

Next action: print or log the exact messages the library sends to the model for one failing case, then decide whether the fault is the prompt, the data or the wiring. For the general idea see [AI agent framework](/glossary/ai-agent-framework), and for the document-question pattern see [retrieval-augmented generation](/glossary/retrieval-augmented-generation).

## Common confusions

- **LangChain versus LangGraph.** LangChain's docs say its agents are built on LangGraph. LangGraph is the lower-level runtime and can be used on its own.
- **LangChain versus a language model.** LangChain calls models made by others. It is not a model and does not make the answers itself.
- **LangChain versus RAG.** RAG is a pattern. LangChain is one library that can help build it, and a RAG system can be built without it.
- **Myth.** LangChain is the standard way to build agents. It is one of several options, and you can also call a model's API directly.

## Worked examples in this catalogue

### [What Is RAG? Retrieval-Augmented Generation Explained](https://skillalmanac.com/learn/what-is-rag)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: An explanation of retrieval-augmented generation: indexing and querying, plus a worked example of how chunking can lose context.

Why it exercises the concept: Question answering over documents is one of the use cases IBM lists for LangChain. The guide explains the pattern itself, independent of any library, so you can judge what a framework adds.

### [How to Build an AI Agent: A Minimal Tool Loop](https://skillalmanac.com/learn/build-an-ai-agent)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A minimal agent in one Python file: a loop that sends tools to the model, runs each requested tool and stops at a hard cap on iterations.

Why it exercises the concept: LangChain's docs describe it as an agent framework. Building the bare loop once shows what a framework like it wraps.

### [rag-chunking-planner](https://skillalmanac.com/skills/skill-almanac/rag-chunking-planner)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Your documents split by three chunking strategies, with defects and offline recall reported for each, so chunk settings are chosen with numbers.

Why it exercises the concept: Libraries of this kind offer ways to split text, and the settings are a choice you must make. This skill measures that choice with your own documents.

## Related terms

- [AI agent framework](https://skillalmanac.com/glossary/ai-agent-framework.md)
- [Retrieval-augmented generation (RAG)](https://skillalmanac.com/glossary/retrieval-augmented-generation.md)
- [AI agent](https://skillalmanac.com/glossary/ai-agent.md)
- [Tool calling (function calling)](https://skillalmanac.com/glossary/tool-calling.md)
- [Embedding](https://skillalmanac.com/glossary/embedding.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [LangSmith](https://skillalmanac.com/glossary/langsmith.md)
- [LangGraph](https://skillalmanac.com/glossary/langgraph.md)
- [LlamaIndex](https://skillalmanac.com/glossary/llamaindex.md)

## Sources

- [LangChain overview](https://docs.langchain.com/oss/python/langchain/overview), LangChain (accessed 2026-11-23)
- [LangGraph overview](https://docs.langchain.com/oss/python/langgraph/overview), LangChain (accessed 2026-11-23)
- [What is LangChain?](https://www.ibm.com/think/topics/langchain), IBM (accessed 2026-11-23)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-23. [Glossary index](https://skillalmanac.com/glossary.md).
