Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Guide · AI & Machine LearningFree

LangChain Documentation

The official docs for LangChain, the open-source framework for building LLM apps and agents. It gives you one interface to many model providers and create_agent, a small configurable agent harness built on LangGraph, with LangSmith for tracing. Read it to judge what a framework adds over plain SDK code.

GitHub stars

147.5k (langchain-ai/langchain)

GitHub · Oct 2026

Licence

MIT

GitHub · Oct 2026

Format

Guide

Topic

AI & Machine Learning

Provider

LangChain

Time needed

A weekend for the core guides

Level

Intermediate

Access

Free

What LangChain is

LangChain is one of the most widely used open-source frameworks for building applications on large language models. Its current docs frame it simply: an agent is a model plus a harness, and LangChain gives you that harness.

What it gives you

  • Model integrations: one interface for OpenAI, Anthropic, Google and many others, including Azure, AWS Bedrock, Ollama, Fireworks and Hugging Face. Switching providers is often a one-line change.
  • create_agent: a minimal, configurable agent harness. You compose the model, tools, prompt and middleware your use case needs.
  • Built on LangGraph: LangChain agents run on LangGraph, which adds durable execution and persistence, so long-running agents can pause and resume.
  • Deep Agents: a more batteries-included agent built on the same pieces.
  • LangSmith: the companion platform for inspecting traces, tool calls, state and latency.

Framework or no framework?

This is a real choice, not a default. A framework helps when you need many provider integrations, durable agents, or ready-made pieces for retrieval and memory. Plain official SDKs plus a small amount of your own code are often clearer for a small feature, and easier to debug when a request fails.

A sensible path: build your first version with a provider SDK so you know what a request and response look like, then read these docs and adopt LangChain when it removes code you would otherwise write and maintain. Keep your prompts and tools in your own files either way, so the framework does not become a source of lock-in.

Prerequisites and time

Comfortable Python (a JavaScript version exists too), and a basic understanding of model APIs, tool calling and RAG. The core guides take a weekend.

Free or paid?

The framework is free and open source under the MIT licence. LangSmith has a free tier and paid plans.

Common questions

Do I need LangChain to build an agent? No. A loop around a provider SDK works for many agents. LangChain helps most when you need many integrations, durable execution or middleware you would otherwise write yourself.

Best for: developers deciding whether a framework belongs in their AI stack, and those building agents with many tools and providers.

aillmagentspythonopen source

Ready to start?

Opens on LangChain in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "LangChain Documentation". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.