Langchain documentation. 2 Learn about the docs refresh for LangChain v0.
Langchain documentation. Productionization: Use LangSmith to inspect, monitor See the full list of integrations in the Section Navigation. x, 20. Chain [source] # Bases: RunnableSerializable [Dict [str, Any], Dict [str, Any]], ABC Abstract base class for creating structured sequences of calls to components. Document module is a collection of classes that handle documents and their transformations. Key benefits include: Modular Workflow: Simplifies chaining LLMs together for reusable and efficient workflows. LangSmith langchain: 0. Full documentation on all methods, classes, installation methods, and integration setups for LangChain. Returns: An LCEL Runnable. A well-documented security schema helps API consumers understand how to authenticate with your API and even enables automatic client generation. 3. js LangGraph. e. The Chain interface makes it easy to create apps that are: documents # Document module is a collection of classes that handle documents and their transformations. Provides the user interface for interacting with the LangGraph agent Includes authentication and proxy routes for secure communication apps/docs - Mintlify Documentation Contains this documentation site built with Mintlify Provides comprehensive setup and usage guides Includes API documentation and development resources Run the command langgraph --help or npx @langchain/langgraph-cli --help to confirm that the CLI is working correctly. Learn more about messages streaming in the streaming guide. It seamlessly integrates with LangChain, and you can use it to inspect and debug individual steps of your chains as you build. You should subclass this class and implement the following: _call method: Run the LLM on the given prompt and input (used by invoke). LangChain simplifies every stage of the LLM application lifecycle: Development: Build your applications using LangChain's open-source building blocks, components, and third-party integrations. If you’re looking for more advanced customization or agent orchestration, check out LangGraph, our framework for building controllable agent workflows. 15 # Main entrypoint into package. You can peruse LangSmith tutorials here. , and provide a simple interface to this sequence. 11. How to: construct knowledge graphs LangGraph. The default MessagesState uses AnyMessage, which supports many message types but is too general for direct LLM exposure. There's now versioned docs and a clearer structure — with tutorials, how-to guides, conceptual guides, and API docs Document loaders are designed to load document objects. ) This Dec 9, 2024 · langchain 0. For example, a workflow answering documentation questions might look like this: This guide shows how to customize the OpenAPI security schema for your LangGraph Platform API documentation. Arbitrary metadata associated with the content. js web interface apps/docs - Mintlify documentation site packages/shared - Shared utilities, types, and constants The monorepo is orchestrated by Turbo, which handles build dependencies and parallel task execution across packages. js (Browser, Serverless and Edge functions) Supabase Edge Functions Browser Deno Bun However, note that individual integrations may not be supported in all environments. Chains should be used to encode a sequence of calls to components like models, document retrievers, other chains, etc. 27 # Main entrypoint into package. Class for storing a piece of text and associated metadata. LangChain has hundreds of integrations with various data sources to load data from: Slack, Notion, Google Drive, etc. 43 ¶ langchain_core. You can peruse LangGraph. These are applications that can answer questions about specific source information. All of LangChain’s reference documentation, in one place. _identifying_params property: Return a dictionary of the identifying parameters This is critical for caching and tracing purposes Jul 23, 2025 · LangChain is an open-source framework designed to simplify the creation of applications using large language models (LLMs). Classes See the full list of integrations in the Section Navigation. You can peruse LangGraph how-to guides here. Jul 23, 2025 · This framework comes with a package for both Python and JavaScript. _identifying_params property: Return a dictionary of the identifying parameters This is critical for caching and tracing purposes LangChain - JavaScript Open-source framework for developing applications powered by large language models (LLMs). LangChain allows AI developers to develop applications based on the combined Large Language Models (such as GPT-4) with external sources of Introduction LangChain is a framework for developing applications powered by language models. ) Reason: rely on a language model to reason (about how to answer based on provided context, what actions to take, etc. Ideally this should be unique across the document collection and formatted as a UUID, but this will not be enforced. Each tool has a description. LangChain-OpenTutorial: The main repository for the LangChain Open Tutorial project. To learn more about LangChain, check out the docs. Please read the resources below before getting started: Documentation style guide Setup Design agents with control Add human oversight and create stateful, scalable workflows with AI agents. x Cloudflare Workers Vercel / Next. Installation Supported Environments LangChain is written in TypeScript and can be used in: Node. Agents select and use Tools and Toolkits for actions. Contribute documentation Documentation is a vital part of LangChain. LangSmith This is documentation for LangChain v0. Why is LangChain Important? LangChain helps manage complex workflows, making it easier to integrate LLMs into various applications like chatbots and document analysis. LLM # class langchain_core. city} (user: {meta?. In this quickstart we'll show you how to build a simple LLM application with LangChain. This tutorial previously used the RunnableWithMessageHistory abstraction. LangChain excels when you need to connect LLMs to external data sources, APIs, or tools– anywhere you need maximum integration flexibility. These applications use a technique known as Retrieval Augmented Generation, or RAG. LangGraph documentation is currently hosted on a separate site. ) This framework Docling parses PDF, DOCX, PPTX, HTML, and other formats into a rich unified representation including document layout, tables etc. Jun 17, 2025 · Build an Agent LangChain supports the creation of agents, or systems that use LLMs as reasoning engines to determine which actions to take and the inputs necessary to perform the action. 💁 Contributing As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation. LangGraph. It includes all the tutorial content and resources. Document ¶ class langchain_core. Still, this is a great way to get started with LangChain - a lot of features can be built with just some prompting and an LLM call! LangChain has two main classes to work with language models: Chat Models and “old-fashioned” LLMs. 72 # langchain-core defines the base abstractions for the LangChain ecosystem. Introduction LangChain is a framework for developing applications powered by large language models (LLMs). agents ¶ Schema definitions for representing agent actions, observations, and return values. The interfaces for core components like chat models, LLMs, vector stores, retrievers, and more are defined here. Some common ones that we see include: chatbots and conversational interfaces, document Q&A and knowledge retrieval systems, and data extraction. js🦜️🔗 LangChain. 2 Learn about the docs refresh for LangChain v0. You can access that version of the documentation in the v0. llms. Chains encode a sequence of calls to components like models, document retrievers, other Chains, etc. Prompt classes and functions make constructing LangChain is a framework for developing applications powered by language models. langchain-opentutorial-pypi: The Python package repository for LangChain OpenTutorial utilities and libraries, available on PyPI for easy integration. Example langchain-community: 0. individual LLM tokens) from any LangChain chat model invocations inside your graph nodes. It provides a standard interface for chains, many integrations with other tools, and end-to-end chains for common applications. tools # Tools are classes that an Agent uses to interact with the world. LangSmith is a unified developer platform for building, testing, and monitoring LLM applications. js ⚡ Building applications with LLMs through composability ⚡ Looking for the Python version? Check out LangChain. js is an extension of LangChain aimed at building robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph. After executing actions, the results can be fed back into the LLM to determine whether more actions are needed, or whether it is okay to finish. Dec 9, 2024 · langchain_core. userId}) </div> ); }; What’s in These Docs This documentation covers everything you need to know about Open SWE: Usage: How to interact with Open SWE through the web interface and GitHub webhooks Setup: Complete development environment setup including monorepo structure, dependencies, and authentication. document_loaders import TextLoader Documentation style guide As LangChain continues to grow, the amount of documentation required to cover the various concepts and integrations continues to grow too. This is often achieved via tool-calling. , making them ready for generative AI workflows like RAG. Class hierarchy: Introduction LangChain is a framework for developing applications powered by large language models (LLMs). Class hierarchy for Memory: Chain # class langchain. String text. Philosophy LangChain's documentation follows the Diataxis framework. Default to a prompt that only contains Document. from langchain. chains. In this tutorial we Head to Integrations for documentation on built-in document loader integrations with 3rd-party tools. In Chains, a sequence of actions is hardcoded. LLM [source] # Bases: BaseLLM Simple interface for implementing a custom LLM. 2. In Agents, a language model is used as a reasoning engine to determine which actions to take and in which order. Under this Components 🗃️ Chat models 90 items 🗃️ Retrievers 67 items 🗃️ Tools/Toolkits 136 items 🗃️ Document loaders 197 items 🗃️ Vector stores 120 items 🗃️ Embedding models 86 items 🗃️ Other 9 items Previous Zotero Next See the full list of integrations in the Section Navigation. LangChain is a framework for building LLM-powered applications. userId}) </div> ); }; What’s in These Docs This documentation covers everything you need to know about Open SWE: Usage: How to interact with Open SWE through the web interface and GitHub webhooks Setup: Complete development environment setup including monorepo structure, dependencies, and authentication ChatLangChain and ChatLangChain. You are currently on a page documenting the use of OpenAI text completion models. The latest and most popular OpenAI models are chat completion models. This application will translate text from English into another language. langchain-core: 0. 2 docs. Hit the ground running using third-party integrations and Templates. This page provides guidelines for anyone writing documentation for LangChain and outlines some of our philosophies around organization and structure. memory # Memory maintains Chain state, incorporating context from past runs. document_variable_name (str) – Variable name to use for the formatted documents in the prompt. The tutorial below is a great way to get How to: pass runtime secrets to a runnable LangGraph LangGraph is an extension of LangChain aimed at building robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph. js - chatbot for answering questions about LangChain's open source libraries Open Canvas - document & chat-based UX for writing code or markdown. Document [source] ¶ Bases: BaseMedia Class for storing a piece of text and associated metadata. This guide provides explanations of the key concepts behind the LangChain framework and AI applications more broadly. LangChain simplifies every stage of the LLM application lifecycle: Development: Build your applications using LangChain's open-source building blocks and components. language_models. It provides essential building blocks like chains, agents, and memory components that enable developers to create sophisticated AI workflows beyond simple prompt-response interactions. Added in version 0. One of the most powerful applications enabled by LLMs is sophisticated question-answering (Q&A) chatbots. documents # Documents module. base. It enables applications that: Are context-aware: connect a language model to sources of context (prompt instructions, few shot examples, content to ground its response in, etc. Learn how to use LangChain's components, integrations, and orchestration framework with tutorials, guides, and API reference. documents. We welcome both new documentation for new features and community improvements to our current documentation. LangChain Labs is a collection of agents and experimental AI products. Class hierarchy: Documentation for LangChain. Classes LLM # class langchain_core. To help you ship LangChain apps to production faster, check out LangSmith. An optional identifier for the document. Defaults to “context”. LangChain is a Python library that simplifies every stage of the LLM application lifecycle: development, productionization, and deployment. apps/open-swe - LangGraph agent application apps/web - Next. New to LangChain or LLM app development in general? Read this material to quickly get up and running building your first applications. document_separator (str) – String separator to use between formatted document strings. See the full list of integrations in the Section Navigation. Installation To install the main langchain package, run: Dec 9, 2024 · langchain_core 0. Instead, define custom agents or workflows that use explicitly typed input and output structures. import { useStreamContext } from "@langchain/langgraph-sdk/react-ui"; const WeatherComponent = (props: { city: string }) => { const { meta } = useStreamContext< { city: string }, { MetaType: { userId?: string } } >(); return ( <div> Weather for {props. Markdown-Generator: A utility tool for generating markdown for GitBook. Agent uses the description to choose the right tool for the job. Sep 22, 2023 · LangChain offers many handy utilities such as document loaders, text splitters, embeddings and vector stores like Chroma. 1, which is no longer actively maintained. Chat Models Language models that use a sequence of messages as inputs and return chat messages as outputs (as opposed to using plain text). LangSmith documentation is hosted on a separate site. It helps you chain together interoperable components and third-party integrations to simplify AI application development — all while future-proofing decisions as the underlying technology evolves. For more information on these concepts, please see our full documentation. page_content. js (ESM and CommonJS) - 18. This is a relatively simple LLM application - it's just a single LLM call plus some prompting. ATTENTION The schema definitions are provided for backwards compatibility. The Chain interface makes it Jul 24, 2025 · LangChain provides some prompts/chains for assisting in this. ⚡️ Quick Install You can use npm, yarn, or pnpm This guide provides explanations of the key concepts behind the LangChain framework and AI applications more broadly. prompts # Prompt is the input to the model. js how-to guides here. LangChain - JavaScript Open-source framework for developing applications powered by large language models (LLMs). agents ¶ Agent is a class that uses an LLM to choose a sequence of actions to take. js documentation is currently hosted on a separate site. For the current stable version, see this version (Latest). Under the hood, the useStream() hook will use the streamMode: "messages-tuple" to receive a stream of messages (i. Evaluation LangSmith helps you evaluate the performance of your LLM applications. x, 19. Prompt is often constructed from multiple components and prompt values. These are traditionally newer models ( older models are generally LLMs, see below). There are many different use cases for LangChain. 2 days ago · LangChain is a powerful framework that simplifies the development of applications powered by large language models (LLMs). May 20, 2024 · Documentation Refresh for LangChain v0. 17 ¶ langchain. wcvygrnxulkivwbbeqabwrneqjrvzmtgbjgptzxgtbiqblqylqmul