LangChain: Framework for building LLM applications
Modular framework for chaining LLMs with external data.
Learn more about LangChain
LangChain is a Python framework for building applications that integrate large language models with external data sources and computational tools. It implements a modular architecture with standardized interfaces for models, embeddings, vector stores, and retrievers, enabling different component implementations to be substituted without modifying core application logic. The framework uses a chain-based composition pattern where operations are linked together sequentially or conditionally to create complex workflows such as retrieval-augmented generation systems and multi-step reasoning agents. Components communicate through a common data structure that preserves context and intermediate results as information flows through the processing pipeline. This abstraction layer allows developers to combine various language models, data retrieval mechanisms, and external APIs into unified applications while maintaining separation between business logic and infrastructure concerns.
Provider-Agnostic Interfaces
Standardized abstractions let you swap LLM providers, vector stores, and embeddings without rewriting application logic. Switch between OpenAI, Anthropic, or local models by changing configuration, not code.
Pre-Built Connector Ecosystem
Includes native integrations for 100+ model providers, vector databases, and external APIs. Eliminates boilerplate for common data sources and reduces time spent on integration code.
Composable Chain Architecture
Links LLM calls, tools, and data retrieval into reusable chains with typed inputs and outputs. Build complex reasoning pipelines by composing simple, testable components.
from langgraph.graph import StateGraph, MessagesState, START, END
def chatbot(state: MessagesState):
return {"messages": [{"role": "ai", "content": "Hello! How can I help?"}]}
graph = StateGraph(MessagesState)
graph.add_node("chatbot", chatbot)
graph.add_edge(START, "chatbot")
graph.add_edge("chatbot", END)
app = graph.compile()
response = app.invoke({"messages": [{"role": "user", "content": "Hi"}]})Fixes response format schema normalization and improves token counting with threading context support.
- –Fix normalize raw schemas in middleware responseformat override
- –Support state updates from wrapmodelcall with commands
- –Bump min core version and improve approximate token counting
- –Threading context through create_agent flows + middleware
Adjusts token count scaling with caps and reverts regex pattern precompilation changes.
- –Adjust cap when scaling approximate token counts
- –Revert precompile hex color regex pattern at module level
- –Apply cap when scaling approximate token counts
- –Allow scaling by reported usage when counting tokens approximately
Fixes tool strategy reuse in agent factory and adds ToolCallRequest to middleware exports.
- –Fix reuse ToolStrategy in agent factory to prevent name mismatch
- –Add ToolCallRequest to middleware exports
- –Fix blocking unit test
- –Use blockbuster to detect blocking calls in the async event loop
See how people are using LangChain
Top in AI & ML
Related Repositories
Discover similar tools and frameworks used by developers
PyTorch
Python framework for differentiable tensor computation and deep learning.
StabilityMatrix
Multi-backend inference UI manager with embedded dependencies.
Chart-GPT
AI tool that generates charts from natural language text descriptions.
Prompt Engineering Guide
Guides, papers, and resources for prompt engineering, RAG, and AI agents.
Ultralytics YOLO
PyTorch library for YOLO-based real-time computer vision.
Related Reading
Guides and comparisons from the Greptile content library
27 Code Quality Tools that Catch Bugs [2026 Review]
The best code quality tools that catch bugs, security vulnerabilities, and runtime errors, sorted by language, with type, noise level, cost, and who each one is for.
What is Shift Left Testing? Everything Engineering Leaders Need to Know
The five types of shift-left testing, the benefits and limitations of each, and how the approach changes when agents write and review a growing share of your code.
API Security: What It Is, Why It Matters, and 7 Best Practices for 2026
What API security is, the OWASP API Security Top 10 risks with real examples from open source PRs, seven best practices to start with, and how to test your APIs with static scanning, dynamic testing, and runtime validation.
Best Code Review Tools in 2026
The best code review tools in 2026, compared on pricing, features, deployment options, and ideal use cases for teams of any size.