🇺🇸 United States · LangChain — The Framework for Building LLM Applications
Status: 🟩 COMPLETE 🟦 LIVING Section: 10 — AI and LLMs
| Vendor | LangChain, Inc. |
| Country/origin | 🇺🇸 United States (San Francisco) |
| Recommended for AUS? | ✅ Yes — open-source framework; widely adopted; can run anywhere |
| Privacy summary | Open-source code; runs in your environment; privacy depends on which LLM/services you connect to; LangChain itself doesn’t process your data |
| Free tier | âś… Open-source (free); LangSmith observability has free tier |
| Paid tiers | LangSmith observability paid plans; LangGraph Cloud (managed); enterprise |
| First released | October 2022 |
| Last reviewed | June 2026 |
| Official site | https://langchain.com |
What it is
LangChain is the most widely-used framework for building applications with LLMs — open-source software libraries (Python and JavaScript/TypeScript) that handle the plumbing of connecting language models to your data, tools, and workflows.
If you’re building an app that uses AI — a chatbot that knows your company’s documents, an AI that processes customer queries, an agent that performs tasks — you probably need to handle: prompts, model calls, conversation history, document retrieval, vector databases, tool definitions, error handling, retries, streaming responses, and dozens of other concerns. LangChain provides standardised abstractions for all of these so you don’t reinvent them.
Founded by Harrison Chase in late 2022, LangChain quickly became the dominant framework in LLM application development. The company has since expanded into:
- LangChain — the core open-source framework
- LangSmith — observability and evaluation (langsmith)
- LangGraph — building agent workflows as state machines
- LangGraph Cloud — managed deployment
Why it matters
For developers building AI applications, the question isn’t usually “which AI model?” — it’s “how do I plug the AI into my data, my workflows, my users?”
LangChain answers this with reusable components:
Standardised model interface
Switch between OpenAI, Anthropic, Google, Mistral, local models — without rewriting your code. Each model has different APIs; LangChain wraps them in a common interface.
Prompt templates
Manage prompts as code: versioned, testable, swappable. Build complex prompts from reusable components.
Memory and conversation history
Handle multi-turn conversations: remembering context, summarising old conversations, managing token limits.
Retrieval Augmented Generation (RAG)
The headline use case: connect an AI to your documents so it can answer questions grounded in your content. LangChain handles document loading, splitting, embedding, vector storage, retrieval, and answer generation.
Tool use and agents
Define tools the AI can call (search the web, query a database, send an email) and let the AI decide when to use them.
Streaming
Stream responses token-by-token to your users for that real-time feel.
Output parsing
Convert AI text responses into structured data (JSON, specific formats) reliably.
What you’d use LangChain for
Real applications built with LangChain:
- Customer service chatbots that answer from company knowledge bases
- Document Q&A systems (chat with your PDFs, reports, contracts)
- Research assistants that search and summarise
- Email drafting tools that match user style
- Sales tools that draft personalised outreach
- Code analysis tools that understand codebases
- Educational tools that adapt to students
- Internal company tools that automate workflows
- AI agents that take actions across multiple systems
If you’ve used a custom AI feature in some product, there’s a reasonable chance LangChain is behind it.
How to get started
Installation
Python:
pip install langchain langchain-openai langchain-anthropicJavaScript/TypeScript:
npm install langchain @langchain/openai @langchain/anthropicA minimal example
from langchain_anthropic import ChatAnthropic
from langchain_core.messages import HumanMessage
model = ChatAnthropic(model="claude-sonnet-4-6")
response = model.invoke([HumanMessage(content="Hello!")])
print(response.content)That’s it — you’ve made an AI call. The power comes when you start chaining components.
A simple RAG example
from langchain_community.document_loaders import TextLoader
from langchain_community.vectorstores import Chroma
from langchain_openai import OpenAIEmbeddings
from langchain.chains import RetrievalQA
from langchain_anthropic import ChatAnthropic
# Load and index documents
docs = TextLoader("my_docs.txt").load()
vectorstore = Chroma.from_documents(docs, OpenAIEmbeddings())
# Build a Q&A chain
qa = RetrievalQA.from_chain_type(
llm=ChatAnthropic(model="claude-sonnet-4-6"),
retriever=vectorstore.as_retriever()
)
# Ask questions
answer = qa.invoke("What did the document say about X?")
print(answer)In ~10 lines: document loading, embedding, vector storage, retrieval, and AI-grounded answers. That’s the LangChain pitch.
LangChain vs LangGraph
LangChain has evolved. Newer pattern:
LangChain (the original framework)
Linear chains: input → process → output. Good for many use cases.
LangGraph (newer; recommended for agents)
State machines: workflows can loop, branch, and have complex control flow. Better for agentic applications where the AI needs to plan and iterate.
For new projects in 2026: many developers start with LangGraph for agent workflows, use LangChain components within.
What it costs
LangChain framework
âś… Free and open-source. Apache 2.0 licence. Use freely commercially.
You pay for:
- LLM API costs (OpenAI, Anthropic, etc.)
- Hosting your application
- Vector database (if cloud-hosted)
- Other services you integrate
LangSmith (observability)
- Free developer tier (5,000 traces/month)
- Paid plans from $39/user/month
- See langsmith
LangGraph Cloud (managed deployment)
- Free tier available
- Pay-as-you-use scaling
- For teams not wanting to manage infrastructure
The LangChain ecosystem
LangChain has become a major ecosystem:
Core libraries
langchain-core— fundamental abstractionslangchain— high-level chains and agentslangchain-community— community-contributed integrationslanggraph— state machine workflows
Integrations (100s)
- Every major LLM provider
- Every major vector database
- Document loaders for many file types
- Tool integrations for common services
LangSmith
Observability and evaluation — see langsmith.
LangGraph Cloud
Managed agent deployment.
LangChain Hub
Shared prompts and templates from the community.
Criticisms and tradeoffs
LangChain is dominant but not loved by everyone:
Common criticisms
- Abstraction overhead — sometimes hides what’s actually happening
- Rapid API changes — early versions changed frequently (more stable now)
- Bloated — many features you might not need
- Documentation gaps — improving but historically a complaint
- Performance overhead — abstractions cost something
Alternative approaches
Direct API calls:
Many developers prefer just using openai or anthropic SDKs directly. Less abstraction; more control.
LlamaIndex: Competitor framework, originally RAG-focused, now broader. Some find it cleaner for document-heavy use cases.
Vercel AI SDK: TypeScript-focused; web app integration; lighter touch. See vercel-ai-sdk.
Pydantic AI: Newer; type-focused; for Python developers who like strict typing.
Haystack: Older RAG framework from deepset.
No framework: Write your own. For specific needs, can be simpler than learning LangChain.
When LangChain is the right choice
- Need many different LLM providers
- Building complex agents
- Want community-vetted patterns
- Team scaling with consistent patterns
- Want LangSmith observability
When something else might be better
- Single-purpose simple use case
- Performance critical
- Strong opinions about architecture
- Want minimum abstractions
Privacy considerations
LangChain itself doesn’t process your data — it’s just code running in your environment. Privacy depends entirely on:
- Which LLM you connect to (OpenAI, Anthropic, local Ollama, etc.)
- Which vector database (cloud or self-hosted)
- Which observability (LangSmith optional)
- Which other services you integrate
For Australian organisations:
- Build with Australian data residency (Vertex AI Sydney, Bedrock Sydney, Azure Australia East)
- Or use local models via Ollama
- Or use Mistral (EU)
- Match LangChain’s privacy properties to your underlying choices
Real-world adoption
LangChain has substantial adoption:
- Over 1 million developers estimated
- Major enterprises using it (across many industries)
- Significant Australian usage in AI consultancies and product teams
- Standard tool in AI engineering job descriptions
For developers wanting to work in AI: LangChain literacy is increasingly expected.
Australian considerations
- Open-source means full data sovereignty when self-hosted
- Pairs well with Australian-hosted LLMs (Bedrock Sydney for Claude, Vertex Sydney for Gemini)
- Active Australian developer community
- Used by Australian AI consultancies and startups
- Pricing of associated services (LangSmith) in USD
Gotchas
- API churn — older tutorials may not match current LangChain. Always check current docs.
- Many ways to do the same thing — paralysis of choice. Pick a pattern and stick with it.
- Easy to over-engineer — sometimes a direct API call is simpler than a LangChain pipeline.
- Cost can balloon — chained LLM calls add up. Monitor with LangSmith or similar.
- Debugging chained workflows is harder than debugging direct calls. Use LangSmith.
- LangChain vs LangGraph confusion — they’re related but different. Newer agent work tends toward LangGraph.
- Production deployment is non-trivial — many teams find LangChain prototyping fast but production hardening substantial.
Recent changes (LIVING)
- LangGraph emergence (2024) — preferred for agentic workflows
- More stable APIs (2024-2025) — vs early days of frequent changes
- LangSmith maturity — observability now genuinely good
- LangGraph Cloud (2024-2025) — managed deployment
- Better TypeScript/JavaScript parity — was Python-first; JS now closer
- Improved documentation
See also
- langsmith — LangChain’s observability product
- langfuse — open-source observability alternative
- vercel-ai-sdk — web-focused alternative
- rag — the major LangChain use case
- agents — what LangGraph enables
- embeddings — used heavily in RAG
- vector-databases — RAG infrastructure
- hugging-face — model source
- vendor cheat sheet
Sources
- LangChain official: langchain.com
- LangChain documentation: python.langchain.com
- Harrison Chase profile (founder)
- LangChain GitHub: github.com/langchain-ai/langchain
- Series A and Series B funding announcements
- Personal experience building with LangChain (2023-2026)
- Developer community discussions