Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1769c51
chore(*): add changelogs
hntrl Oct 17, 2025
8f413c7
chore(*): package updates
hntrl Oct 17, 2025
0962294
chore: readme updates
hntrl Oct 17, 2025
6dd01f8
release(core): 1.0.0
hntrl Oct 17, 2025
612f93f
release(textsplitters): 1.0.0
hntrl Oct 17, 2025
041209f
release(classic): 1.0.0
hntrl Oct 17, 2025
578e1b6
release(anthropic): 1.0.0
hntrl Oct 17, 2025
0a2da13
release(openai): 1.0.0
hntrl Oct 17, 2025
20ab17a
release(aws): 1.0.0
hntrl Oct 17, 2025
d2f3a57
release(deepseek): 1.0.0
hntrl Oct 17, 2025
388bc04
release(google-common): 1.0.0
hntrl Oct 17, 2025
f49c06b
release(google-gauth): 1.0.0
hntrl Oct 17, 2025
2ddc9fc
release(google-webauth): 1.0.0
hntrl Oct 17, 2025
2183bf7
release(google-genai): 1.0.0
hntrl Oct 17, 2025
3221eb9
release(google-vertexai): 1.0.0
hntrl Oct 17, 2025
b265c50
release(google-vertexai-web): 1.0.0
hntrl Oct 17, 2025
c4c689f
release(groq): 1.0.0
hntrl Oct 17, 2025
ed1319b
release(ollama): 1.0.0
hntrl Oct 17, 2025
fc324c8
release(xai): 1.0.0
hntrl Oct 17, 2025
9608bde
release(core): 1.0.1
hntrl Oct 17, 2025
08a250b
release(tavily): 1.0.0
hntrl Oct 17, 2025
e8f575a
release(mistralai): 1.0.0
hntrl Oct 17, 2025
61d5649
release(mcp-adapters): 1.0.0
hntrl Oct 18, 2025
94cee47
release(langchain): 1.0.0
hntrl Oct 18, 2025
02df570
release(langchain): 1.0.1
hntrl Oct 18, 2025
d8a4b76
release(azure-cosmosdb): 1.0.0
hntrl Oct 18, 2025
7a60c52
release(azure-dynamic-sessions): 1.0.0
hntrl Oct 18, 2025
eb253b6
release(baidu-qianfan): 1.0.0
hntrl Oct 18, 2025
4a2471f
release(cerebras): 1.0.0
hntrl Oct 18, 2025
aa1c93f
release(cloudflare): 1.0.0
hntrl Oct 18, 2025
ed84685
release(cohere): 1.0.0
hntrl Oct 18, 2025
898fe5e
release(exa): 1.0.0
hntrl Oct 18, 2025
4a1f99b
release(google-cloud-sql-pg): 1.0.0
hntrl Oct 18, 2025
1add220
release(mixedbread-ai): 1.0.0
hntrl Oct 18, 2025
d35bae8
release(mongodb): 1.0.0
hntrl Oct 18, 2025
97f9d4a
release(nomic): 1.0.0
hntrl Oct 18, 2025
0cb0246
release(pinecone): 1.0.0
hntrl Oct 18, 2025
032cd5b
release(qdrant): 1.0.0
hntrl Oct 18, 2025
01f7246
release(redis): 1.0.0
hntrl Oct 18, 2025
f899df9
release(weaviate): 1.0.0
hntrl Oct 18, 2025
7d52ccf
release(yandex): 1.0.0
hntrl Oct 18, 2025
3dc89ef
release(community): 1.0.0
hntrl Oct 18, 2025
111c591
cr
hntrl Oct 18, 2025
9f0d6c0
chore: fix dep tests
hntrl Oct 20, 2025
49d38a9
chore: fix anthropic dep test again
hntrl Oct 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 9 additions & 54 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ We aim to keep the same core APIs between the Python and JS versions of LangChai

### Want to add a specific integration?

LangChain supports several different types of integrations with third-party providers and frameworks, including LLM providers (e.g. [OpenAI](https://github.com/langchain-ai/langchainjs/blob/main/libs/providers/langchain-openai/src/chat_models.ts)), vector stores (e.g. [FAISS](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-community/src/vectorstores/faiss.ts), document loaders (e.g. [Apify](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-community/src/document_loaders/web/apify_dataset.ts)) persistent message history stores (e.g. [Redis](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-redis/src/caches.ts)), and more.
LangChain supports several different types of integrations with third-party providers and frameworks, including LLM providers (e.g. [OpenAI](https://github.com/langchain-ai/langchainjs/blob/main/libs/providers/langchain-openai/src/chat_models.ts)), vector stores (e.g. [FAISS](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-community/src/vectorstores/faiss.ts), document loaders (e.g. [Apify](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-community/src/document_loaders/web/apify_dataset.ts)) persistent message history stores (e.g. [Redis](https://github.com/langchain-ai/langchainjs/blob/main/libs/providers/langchain-redis/src/caches.ts)), and more.

We welcome such contributions, but ask that you read our dedicated [integration contribution guide](https://github.com/langchain-ai/langchainjs/blob/main/.github/contributing/INTEGRATIONS.md) for specific details and patterns to consider before opening a pull request.

Expand All @@ -31,23 +31,6 @@ You can also check out the [guides on extending LangChain.js](https://js.langcha

Integrations should generally reside in the `libs/langchain-community` workspace and be imported as `@langchain/community/module/name`. More in-depth integrations or suites of integrations may also reside in separate packages that depend on and extend `@langchain/core`. See [`@langchain/google-genai`](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-google-genai) for an example.

To make creating packages like this easier, we offer the [`create-langchain-integration`](https://github.com/langchain-ai/langchainjs/blob/main/libs/create-langchain-integration/) utility that will automatically scaffold a repo with support for both ESM + CJS entrypoints. You can run it like this:

```bash
npx create-langchain-integration
```

After creating the new integration package, you should add it to the [`unit-tests-integrations.yml`](./.github/workflows/unit-tests-integrations.yml) GitHub action workflow so that it is tested in CI. To do this,simply update the `env` section of the `prepare-matrix` job with your package name inside the `PACKAGES` variable:

```yaml
prepare-matrix:
needs: get-changed-files
runs-on: ubuntu-latest
env:
PACKAGES: "anthropic,cloudflare,<your-package>"
...
```

### Want to add a feature that's already in Python?

If you're interested in contributing a feature that's already in the [LangChain Python repo](https://github.com/langchain-ai/langchain) and you'd like some help getting started, you can try pasting code snippets and classes into the [LangChain Python to JS translator](https://langchain-translator.vercel.app/).
Expand Down Expand Up @@ -90,34 +73,9 @@ good code into the codebase.
As of now, LangChain has an ad hoc release process: releases are cut with high frequency by
a developer and published to [npm](https://www.npmjs.com/package/langchain).

LangChain follows the [semver](https://semver.org/) versioning standard. However, as pre-1.0 software,
even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4).

If your contribution has made its way into a release, we will want to give you credit on Twitter (only if you want though)!
If you have a Twitter account you would like us to mention, please let us know in the PR or in another manner.

#### Integration releases

The release script can be executed only while on a fresh `main` branch, with no un-committed changes, from the package root. If working from a fork of the repository, make sure to sync the forked `main` branch with the upstream `main` branch first.

You can invoke the script by calling `pnpm release`. If new dependencies have been added to the integration package, install them first (i.e. run `pnpm install`, then `pnpm release`).

There are three parameters which can be passed to this script, one required and two optional.

- **Required**: `<workspace name>`. eg: `@langchain/core` The name of the package to release. Can be found in the `name` value of the package's `package.json`
- **Optional**: `--bump-deps` eg `--bump-deps` Will find all packages in the repo which depend on this workspace and checkout a new branch, update the dep version, run pnpm install, commit & push to new branch. Generally, this is not necessary.
- **Optional**: `--tag <tag>` eg `--tag beta` Add a tag to the NPM release. Useful if you want to push a release candidate.

This script automatically bumps the package version, creates a new release branch with the changes, pushes the branch to GitHub, uses `release-it` to automatically release to NPM, and more depending on the flags passed.

Halfway through this script, you'll be prompted to enter an NPM OTP (typically from an authenticator app). This value is not stored anywhere and is only used to authenticate the NPM release.

> **Note** Unless releasing `langchain`, `no` should be answered to all prompts following `Publish @langchain/<package> to npm?`. Then, the change should be manually committed with the following commit message: `<package>[patch]: Release <new version>`. E.g.: `groq[patch]: Release 0.0.1`.

Docker must be running if releasing one of `langchain`, `@langchain/core` or `@langchain/community`. These packages run LangChain's export tests, which run inside docker containers.

Full example: `pnpm release @langchain/core`.

### 🛠️ Tooling

This project uses the following tools, which are worth getting familiar
Expand All @@ -126,10 +84,7 @@ with if you plan to contribute:
- **[pnpm](https://pnpm.io/) (v10.14.0)** - dependency management
- **[eslint](https://eslint.org/)** - enforcing standard lint rules
- **[prettier](https://prettier.io/)** - enforcing standard code formatting
- **[jest](https://jestjs.io/)** - testing code
- **[TypeDoc](https://typedoc.org/)** - reference doc generation from
comments
- **[Docusaurus](https://docusaurus.io/)** - static site generation for documentation
- **[vitest](https://vitest.dev/)** - testing code

## 🚀 Quick Start

Expand All @@ -144,10 +99,10 @@ Next, try running the following common tasks:
## ✅ Common Tasks

Our goal is to make it as easy as possible for you to contribute to this project.
All of the below commands should be run from within a workspace directory (e.g. `langchain`, `libs/langchain-community`) unless otherwise noted.
All of the below commands should be run from within a workspace directory (e.g. `libs/langchain`, `libs/langchain-community`) unless otherwise noted.

```bash
cd langchain
cd libs/langchain
```

Or, if you are working on a community integration:
Expand All @@ -166,7 +121,7 @@ To get started, you will need to install the dependencies for the project. To do
pnpm install
```

Then, you will need to switch directories into `langchain-core` and build core by running:
Then, you will need to switch directories into `libs/langchain-core` and build core by running:

```bash
cd libs/langchain-core
Expand Down Expand Up @@ -229,8 +184,8 @@ This is useful for developing individual features.
If you add support for a new external API, please add a new integration test.
Integration tests should be called `*.int.test.ts`.

Note that most integration tests require credentials or other setup. You will likely need to set up a `langchain/.env` or `libs/langchain-community/.env` file
like the example [here](https://github.com/langchain-ai/langchainjs/blob/main/langchain/.env.example).
Note that most integration tests require credentials or other setup. You will likely need to set up a `libs/langchain/.env` or `libs/langchain-community/.env` file
like the example [here](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain/.env.example).

We generally recommend only running integration tests with `pnpm test:single`, but if you want to run all integration tests, run:

Expand All @@ -257,7 +212,7 @@ import { OpenAI } from "langchain/llms/openai";
We call these subpaths "entrypoints". In general, you should create a new entrypoint if you are adding a new integration with a 3rd party library. If you're adding self-contained functionality without any external dependencies, you can add it to an existing entrypoint.

In order to declare a new entrypoint that users can import from, you
should edit the `langchain/langchain.config.js` or `libs/langchain-community/langchain.config.js` file. To add an
should edit the `libs/langchain/langchain.config.js` or `libs/langchain-community/langchain.config.js` file. To add an
entrypoint `tools` that imports from `tools/index.ts` you'd add
the following to the `entrypoints` key inside the `config` variable:

Expand All @@ -270,7 +225,7 @@ entrypoints: {
// ...
```

If you're adding a new integration which requires installing a third party dependency, you must add the entrypoint to the `requiresOptionalDependency` array, also located inside `langchain/langchain.config.js` or `libs/langchain-community/langchain.config.js`.
If you're adding a new integration which requires installing a third party dependency, you must add the entrypoint to the `requiresOptionalDependency` array, also located inside `libs/langchain/langchain.config.js` or `libs/langchain-community/langchain.config.js`.

```typescript
// ...
Expand Down
102 changes: 28 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# 🦜️🔗 LangChain.js

⚡ Building applications with LLMs through composability ⚡
![npm](https://img.shields.io/npm/dm/langchain) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![npm](https://img.shields.io/npm/dm/langchain) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai) [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/langchain-ai/langchainjs)
[<img src="https://github.com/codespaces/badge.svg" title="Open in Github Codespace" width="150" height="20">](https://codespaces.new/langchain-ai/langchainjs)
LangChain is a framework for building LLM-powered applications. 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.

Looking for the Python version? Check out [LangChain](https://github.com/langchain-ai/langchain).
**Documentation**: To learn more about LangChain, check out [the docs](https://docs.langchain.com/oss/javascript/langchain/overview).

If you're looking for more advanced customization or agent orchestration, check out [LangGraph.js](https://langchain-ai.github.io/langgraphjs/). our framework for building agents and controllable workflows.

> [!NOTE]
> Looking for the Python version? Check out [LangChain](https://github.com/langchain-ai/langchain).

To help you ship LangChain apps to production faster, check out [LangSmith](https://smith.langchain.com).
[LangSmith](https://smith.langchain.com) is a unified developer platform for building, testing, and monitoring LLM applications.
Expand All @@ -16,83 +20,37 @@ You can use npm, pnpm, or yarn to install LangChain.js

`npm install -S langchain` or `pnpm install langchain` or `yarn add langchain`

## 🌐 Supported Environments

LangChain is written in TypeScript and can be used in:

- Node.js (ESM and CommonJS) - 20.x, 22.x, 24.x
- Cloudflare Workers
- Vercel / Next.js (Browser, Serverless and Edge functions)
- Supabase Edge Functions
- Browser
- Deno

## 🤔 What is LangChain?

**LangChain** is a framework for developing applications powered by language models. 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.)
- **Reason**: rely on a language model to reason (about how to answer based on provided context, what actions to take, etc.)

This framework consists of several parts.

- **Open-source libraries**: Build your applications using LangChain's open-source [building blocks](https://js.langchain.com/docs/concepts/lcel), [components](https://js.langchain.com/docs/concepts), and [third-party integrations](https://js.langchain.com/docs/integrations/platforms/).
Use [LangGraph.js](https://js.langchain.com/docs/concepts/#langgraphjs) to build stateful agents with first-class streaming and human-in-the-loop support.
- **Productionization**: Use [LangSmith](https://docs.smith.langchain.com/) to inspect, monitor and evaluate your chains, so that you can continuously optimize and deploy with confidence.
- **Deployment**: Turn your LangGraph applications into production-ready APIs and Assistants with [LangGraph Cloud](https://docs.langchain.com/langgraph-platform/deployment-quickstart).

The LangChain libraries themselves are made up of several different packages.

- **[`@langchain/core`](https://github.com/langchain-ai/langchainjs/blob/main/langchain-core)**: Base abstractions.
- **[`@langchain/community`](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-community)**: Third party integrations.
- **[`langchain`](https://github.com/langchain-ai/langchainjs/blob/main/langchain)**: Chains, agents, and retrieval strategies that make up an application's cognitive architecture.
- **[LangGraph.js](https://langchain-ai.github.io/langgraphjs/)**: LangGraph powers production-grade agents, trusted by Linkedin, Uber, Klarna, GitLab, and many more. Build robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph. Integrates smoothly with LangChain, but can be used without it.
## 🚀 Why use LangChain?

Integrations may also be split into their own compatible packages.
LangChain helps developers build applications powered by LLMs through a standard interface for agents, models, embeddings, vector stores, and more.

This library aims to assist in the development of those types of applications. Common examples of these applications include:
Use LangChain for:

**❓Question Answering over specific documents**
- **Real-time data augmentation**. Easily connect LLMs to diverse data sources and external/internal systems, drawing from LangChain’s vast library of integrations with model providers, tools, vector stores, retrievers, and more.
- **Model interoperability**. Swap models in and out as your engineering team experiments to find the best choice for your application’s needs. As the industry frontier evolves, adapt quickly — LangChain’s abstractions keep you moving without losing momentum.

- [Documentation](https://js.langchain.com/docs/tutorials/rag/)
- End-to-end Example: [Doc-Chatbot](https://github.com/dissorial/doc-chatbot)
## 📦 LangChain's ecosystem

**💬 Chatbots**
- [LangSmith](https://www.langchain.com/langsmith) - Unified developer platform for building, testing, and monitoring LLM applications. With LangSmith, you can debug poor-performing LLM app runs, evaluate agent trajectories, gain visibility in production, and deploy agents with confidence.
- [LangGraph](https://docs.langchain.com/oss/javascript/langgraph/overview) - Build agents that can reliably handle complex tasks with LangGraph, our low-level agent orchestration framework. LangGraph offers customizable architecture, long-term memory, and human-in-the-loop workflows — and is trusted in production by companies like LinkedIn, Uber, Klarna, and GitLab.

- [Documentation](https://js.langchain.com/docs/tutorials/chatbot)
- End-to-end Example: [Chat-LangChain](https://github.com/langchain-ai/chat-langchain)

## 🚀 How does LangChain help?

The main value props of the LangChain libraries are:

1. **Components**: composable tools and integrations for working with language models. Components are modular and easy-to-use, whether you are using the rest of the LangChain framework or not
2. **Off-the-shelf chains**: built-in assemblages of components for accomplishing higher-level tasks

Off-the-shelf chains make it easy to get started. Components make it easy to customize existing chains and build new ones.

Components fall into the following **modules**:

**📃 Model I/O:**

This includes prompt management, prompt optimization, a generic interface for all LLMs, and common utilities for working with LLMs.

**📚 Retrieval:**

Data Augmented Generation involves specific types of chains that first interact with an external data source to fetch data for use in the generation step. Examples include summarization of long pieces of text and question/answering over specific data sources.
## 🌐 Supported Environments

**🤖 Agents:**
LangChain.js is written in TypeScript and can be used in:

Agents allow an LLM autonomy over how a task is accomplished. Agents make decisions about which Actions to take, then take that Action, observe the result, and repeat until the task is complete. LangChain provides a [standard interface for agents](https://js.langchain.com/docs/concepts/#agents), along with [LangGraph.js](https://github.com/langchain-ai/langgraphjs/) for building custom agents.
- Node.js (ESM and CommonJS) - 18.x, 19.x, 20.x, 22.x
- Cloudflare Workers
- Vercel / Next.js (Browser, Serverless and Edge functions)
- Supabase Edge Functions
- Browser
- Deno

## 📖 Additional Resources

- [Getting started](https://js.langchain.com/docs/introduction): installation, setting up the environment, simple examples
- Overview of the [interfaces](https://js.langchain.com/docs/how_to/lcel_cheatsheet/), [modules](https://js.langchain.com/docs/concepts) and [integrations](https://js.langchain.com/docs/integrations/platforms/)
- [Full Documentation](https://js.langchain.com)
- [Tutorial](https://js.langchain.com/docs/tutorials/) walkthroughs
- [Langhain Forum](https://forum.langchain.com)
- [API Reference](https://api.js.langchain.com)
- [Getting started](https://docs.langchain.com/oss/javascript/langchain/overview): Installation, setting up the environment, simple examples
- [Learn](https://docs.langchain.com/oss/javascript/langchain/learn): Learn about the core concepts of LangChain.
- [LangChain Forum](https://forum.langchain.com): Connect with the community and share all of your technical questions, ideas, and feedback.
- [Chat LangChain](https://chat.langchain.com): Ask questions & chat with our documentaiton.

## 💁 Contributing

Expand All @@ -101,7 +59,3 @@ As an open-source project in a rapidly developing field, we are extremely open t
For detailed information on how to contribute, see [here](https://github.com/langchain-ai/langchainjs/blob/main/CONTRIBUTING.md).

Please report any security issues or concerns following our [security guidelines](https://github.com/langchain-ai/langchainjs/blob/main/SECURITY.md).

## 🖇️ Relationship with Python LangChain

This is built to integrate as seamlessly as possible with the [LangChain Python package](https://github.com/langchain-ai/langchain). Specifically, this means all objects (prompts, LLMs, chains, etc) are designed in a way where they can be serialized and shared between languages.
Loading