0% found this document useful (0 votes)
18 views6 pages

Introduction to LangChain Framework

LangChain is a framework designed for developing applications powered by large language models (LLMs), simplifying the development, productionization, and deployment stages of the application lifecycle. It consists of multiple open-source libraries and integrates with various providers to create production-ready applications. The documentation includes guides, tutorials, and API references to assist users in building and optimizing their LLM applications.

Uploaded by

amkslade101
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

Introduction to LangChain Framework

LangChain is a framework designed for developing applications powered by large language models (LLMs), simplifying the development, productionization, and deployment stages of the application lifecycle. It consists of multiple open-source libraries and integrates with various providers to create production-ready applications. The documentation includes guides, tutorials, and API references to assist users in building and optimizing their LLM applications.

Uploaded by

amkslade101
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction

Introduction Open on GitHub

LangChain is a framework for developing applications powered by large language models


(LLMs).

LangChain simplifies every stage of the LLM application lifecycle:

Development: Build your applications using LangChain's open-source components and


third-party integrations. Use LangGraph to build stateful agents with first-class streaming
and human-in-the-loop support.
Productionization: Use LangSmith to inspect, monitor and evaluate your applications, so
that you can continuously optimize and deploy with confidence.
Deployment: Turn your LangGraph applications into production-ready APIs and Assistants
with LangGraph Platform.
LangChain implements a standard interface for large language models and related
technologies, such as embedding models and vector stores, and integrates with hundreds of
providers. See the integrations page for more.

Select chat model: Google Gemini ▾

pip install -qU "langchain[google-genai]"

import getpass
import os

if not [Link]("GOOGLE_API_KEY"):
[Link]["GOOGLE_API_KEY"] = [Link]("Enter API key for Google
Gemini: ")

from langchain.chat_models import init_chat_model


model = init_chat_model("gemini-2.5-flash", model_provider="google_genai")

[Link]("Hello, world!")

NOTE
These docs focus on the Python LangChain library. Head here for docs on the JavaScript
LangChain library.

Architecture
The LangChain framework consists of multiple open-source libraries. Read more in the
Architecture page.

langchain-core : Base abstractions for chat models and other components.

Integration packages (e.g. langchain-openai , langchain-anthropic , etc.): Important


integrations have been split into lightweight packages that are co-maintained by the
LangChain team and the integration developers.
langchain : Chains, agents, and retrieval strategies that make up an application's cognitive

architecture.
langchain-community : Third-party integrations that are community maintained.

langgraph : Orchestration framework for combining LangChain components into

production-ready applications with persistence, streaming, and other key features. See
LangGraph documentation.

Guides
Tutorials
If you're looking to build something specific or are more of a hands-on learner, check out our
tutorials section. This is the best place to get started.

These are the best ones to get started with:

Build a Simple LLM Application


Build a Chatbot
Build an Agent
Introduction to LangGraph

Explore the full list of LangChain tutorials here, and check out other LangGraph tutorials here.
To learn more about LangGraph, check out our first LangChain Academy course, Introduction to
LangGraph, available here.

How-to guides
Here you’ll find short answers to “How do I….?” types of questions. These how-to guides don’t
cover topics in depth – you’ll find that material in the Tutorials and the API Reference. However,
these guides will help you quickly accomplish common tasks using chat models, vector stores,
and other common LangChain components.

Check out LangGraph-specific how-tos here.

Conceptual guide
Introductions to all the key parts of LangChain you’ll need to know! Here you'll find high level
explanations of all LangChain concepts.

For a deeper dive into LangGraph concepts, check out this page.

Integrations
LangChain is part of a rich ecosystem of tools that integrate with our framework and build on
top of it. If you're looking to get up and running quickly with chat models, vector stores, or other
LangChain components from a specific provider, check out our growing list of integrations.

API reference
Head to the reference section for full documentation of all classes and methods in the
LangChain Python packages.

Ecosystem
🦜🛠️ LangSmith
Trace and evaluate your language model applications and intelligent agents to help you move
from prototype to production.

🦜🕸️ LangGraph
Build stateful, multi-actor applications with LLMs. Integrates smoothly with LangChain, but can
be used without it. LangGraph powers production-grade agents, trusted by Linkedin, Uber,
Klarna, GitLab, and many more.

Additional resources
Versions
See what changed in v0.3, learn how to migrate legacy code, read up on our versioning policies,
and more.

Security
Read up on security best practices to make sure you're developing safely with LangChain.

Contributing
Check out the developer's guide for guidelines on contributing and help getting your dev
environment set up.

Edit this page

Common questions

Powered by AI

Key features that differentiate LangChain from other LLM application frameworks include its comprehensive lifecycle support covering development, productionization, and deployment, integration with a broad array of providers, and a robust ecosystem featuring tools like LangSmith and LangGraph. These features collectively enable efficient development, stringent monitoring, and production-ready deployments which are not found as a cohesive package in many other frameworks .

LangChain supports developers in building chat-based models through its integrations with a variety of providers that supply chat functionalities. It provides a selection of chat models and tools like vector stores, enabling developers to start quickly and efficiently with chat applications. These integrations allow developers to leverage existing technologies to enhance the capabilities of their applications .

LangSmith plays a crucial role in the LangChain framework by providing tools to inspect, monitor, and evaluate LLM applications, which is essential for continuous optimization and deployment. It allows developers to trace and assess their applications, facilitating a smoother transition from prototype to production by ensuring robust application performance .

LangChain ensures flexibility by implementing a standard interface for large language models and related technologies, such as embedding models and vector stores. This standardization allows it to integrate with hundreds of providers, thereby offering developers the ability to quickly adapt to different technologies and models as needed .

Open-source components in LangChain's architecture provide significant contributions to the developer community by allowing for collaborative development and adaptation of tools to suit specific needs. These components ensure transparency, encourage innovation, and foster a community-driven approach to evolving LangChain's capabilities, enabling developers to modify and improve tools for bespoke applications .

The primary goals of the LangChain framework in the LLM development lifecycle are to simplify the process of building, productionizing, and deploying applications powered by large language models. It aims to facilitate development with open-source components and third-party integrations, streamline productionization by using LangSmith for monitoring and optimization, and enable deployment of production-ready applications with LangGraph Platform .

LangGraph enhances the development of stateful applications by acting as an orchestration framework that combines LangChain components into production-ready applications with features like persistence and streaming. It offers multi-actor, stateful capabilities that are suitable for constructing complex applications, enabling trusted use in production environments by companies like LinkedIn and Uber .

Community maintenance plays a critical role in LangChain's development by fostering a shared responsibility for the evolution and improvement of the framework. The community contributes to creating and maintaining integration packages, which enriches the ecosystem and accelerates innovations by bringing diverse expertise and viewpoints. Such collaboration helps keep the framework dynamic and responsive to new challenges and opportunities .

LangChain's integration with third-party providers enhances its utility by expanding the range of accessible technologies and resources for developers. These integrations allow seamless incorporation of advanced features and models tailored to specific applications, thus broadening the potential use cases of LangChain and allowing for diverse applications in varying environments .

Developers should focus on security best practices when working with LangChain to ensure the safety and integrity of their applications. This includes being vigilant about version updates, managing sensitive information such as API keys securely, and incorporating secure coding practices to prevent potential vulnerabilities in large language model executions .

You might also like