Skip to content

Commit 786146c

Browse files
committed
chore: readme updates
1 parent 1c0c953 commit 786146c

File tree

6 files changed

+244
-302
lines changed

6 files changed

+244
-302
lines changed

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ We aim to keep the same core APIs between the Python and JS versions of LangChai
2121

2222
### Want to add a specific integration?
2323

24-
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.
24+
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.
2525

2626
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.
2727

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

3232
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.
3333

34-
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:
35-
36-
```bash
37-
npx create-langchain-integration
38-
```
39-
40-
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:
41-
42-
```yaml
43-
prepare-matrix:
44-
needs: get-changed-files
45-
runs-on: ubuntu-latest
46-
env:
47-
PACKAGES: "anthropic,cloudflare,<your-package>"
48-
...
49-
```
50-
5134
### Want to add a feature that's already in Python?
5235

5336
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/).
@@ -90,34 +73,9 @@ good code into the codebase.
9073
As of now, LangChain has an ad hoc release process: releases are cut with high frequency by
9174
a developer and published to [npm](https://www.npmjs.com/package/langchain).
9275

93-
LangChain follows the [semver](https://semver.org/) versioning standard. However, as pre-1.0 software,
94-
even patch releases may contain [non-backwards-compatible changes](https://semver.org/#spec-item-4).
95-
9676
If your contribution has made its way into a release, we will want to give you credit on Twitter (only if you want though)!
9777
If you have a Twitter account you would like us to mention, please let us know in the PR or in another manner.
9878

99-
#### Integration releases
100-
101-
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.
102-
103-
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`).
104-
105-
There are three parameters which can be passed to this script, one required and two optional.
106-
107-
- **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`
108-
- **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.
109-
- **Optional**: `--tag <tag>` eg `--tag beta` Add a tag to the NPM release. Useful if you want to push a release candidate.
110-
111-
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.
112-
113-
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.
114-
115-
> **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`.
116-
117-
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.
118-
119-
Full example: `pnpm release @langchain/core`.
120-
12179
### πŸ› οΈ Tooling
12280

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

13489
## πŸš€ Quick Start
13590

@@ -144,10 +99,10 @@ Next, try running the following common tasks:
14499
## βœ… Common Tasks
145100

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

149104
```bash
150-
cd langchain
105+
cd libs/langchain
151106
```
152107

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

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

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

232-
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
233-
like the example [here](https://github.com/langchain-ai/langchainjs/blob/main/langchain/.env.example).
187+
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
188+
like the example [here](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain/.env.example).
234189

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

@@ -257,7 +212,7 @@ import { OpenAI } from "langchain/llms/openai";
257212
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.
258213

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

@@ -270,7 +225,7 @@ entrypoints: {
270225
// ...
271226
```
272227

273-
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`.
228+
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`.
274229

275230
```typescript
276231
// ...

β€ŽREADME.mdβ€Ž

Lines changed: 28 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# πŸ¦œοΈπŸ”— LangChain.js
22

3-
⚑ Building applications with LLMs through composability ⚑
3+
![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)
44

5-
[![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)
6-
[<img src="https://github.com/codespaces/badge.svg" title="Open in Github Codespace" width="150" height="20">](https://codespaces.new/langchain-ai/langchainjs)
5+
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.
76

8-
Looking for the Python version? Check out [LangChain](https://github.com/langchain-ai/langchain).
7+
**Documentation**: To learn more about LangChain, check out [the docs](https://docs.langchain.com/oss/javascript/langchain/overview).
8+
9+
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.
10+
11+
> [!NOTE]
12+
> Looking for the Python version? Check out [LangChain](https://github.com/langchain-ai/langchain).
913
1014
To help you ship LangChain apps to production faster, check out [LangSmith](https://smith.langchain.com).
1115
[LangSmith](https://smith.langchain.com) is a unified developer platform for building, testing, and monitoring LLM applications.
@@ -16,83 +20,37 @@ You can use npm, pnpm, or yarn to install LangChain.js
1620

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

19-
## 🌐 Supported Environments
20-
21-
LangChain is written in TypeScript and can be used in:
22-
23-
- Node.js (ESM and CommonJS) - 20.x, 22.x, 24.x
24-
- Cloudflare Workers
25-
- Vercel / Next.js (Browser, Serverless and Edge functions)
26-
- Supabase Edge Functions
27-
- Browser
28-
- Deno
29-
30-
## πŸ€” What is LangChain?
31-
32-
**LangChain** is a framework for developing applications powered by language models. It enables applications that:
33-
34-
- **Are context-aware**: connect a language model to sources of context (prompt instructions, few shot examples, content to ground its response in, etc.)
35-
- **Reason**: rely on a language model to reason (about how to answer based on provided context, what actions to take, etc.)
36-
37-
This framework consists of several parts.
38-
39-
- **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/).
40-
Use [LangGraph.js](https://js.langchain.com/docs/concepts/#langgraphjs) to build stateful agents with first-class streaming and human-in-the-loop support.
41-
- **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.
42-
- **Deployment**: Turn your LangGraph applications into production-ready APIs and Assistants with [LangGraph Cloud](https://docs.langchain.com/langgraph-platform/deployment-quickstart).
43-
44-
The LangChain libraries themselves are made up of several different packages.
45-
46-
- **[`@langchain/core`](https://github.com/langchain-ai/langchainjs/blob/main/langchain-core)**: Base abstractions.
47-
- **[`@langchain/community`](https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-community)**: Third party integrations.
48-
- **[`langchain`](https://github.com/langchain-ai/langchainjs/blob/main/langchain)**: Chains, agents, and retrieval strategies that make up an application's cognitive architecture.
49-
- **[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.
23+
## πŸš€ Why use LangChain?
5024

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

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

55-
**❓Question Answering over specific documents**
29+
- **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.
30+
- **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.
5631

57-
- [Documentation](https://js.langchain.com/docs/tutorials/rag/)
58-
- End-to-end Example: [Doc-Chatbot](https://github.com/dissorial/doc-chatbot)
32+
## πŸ“¦ LangChain's ecosystem
5933

60-
**πŸ’¬ Chatbots**
34+
- [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.
35+
- [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.
6136

62-
- [Documentation](https://js.langchain.com/docs/tutorials/chatbot)
63-
- End-to-end Example: [Chat-LangChain](https://github.com/langchain-ai/chat-langchain)
64-
65-
## πŸš€ How does LangChain help?
66-
67-
The main value props of the LangChain libraries are:
68-
69-
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
70-
2. **Off-the-shelf chains**: built-in assemblages of components for accomplishing higher-level tasks
71-
72-
Off-the-shelf chains make it easy to get started. Components make it easy to customize existing chains and build new ones.
73-
74-
Components fall into the following **modules**:
75-
76-
**πŸ“ƒ Model I/O:**
77-
78-
This includes prompt management, prompt optimization, a generic interface for all LLMs, and common utilities for working with LLMs.
79-
80-
**πŸ“š Retrieval:**
81-
82-
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.
37+
## 🌐 Supported Environments
8338

84-
**πŸ€– Agents:**
39+
LangChain.js is written in TypeScript and can be used in:
8540

86-
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.
41+
- Node.js (ESM and CommonJS) - 18.x, 19.x, 20.x, 22.x
42+
- Cloudflare Workers
43+
- Vercel / Next.js (Browser, Serverless and Edge functions)
44+
- Supabase Edge Functions
45+
- Browser
46+
- Deno
8747

8848
## πŸ“– Additional Resources
8949

90-
- [Getting started](https://js.langchain.com/docs/introduction): installation, setting up the environment, simple examples
91-
- 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/)
92-
- [Full Documentation](https://js.langchain.com)
93-
- [Tutorial](https://js.langchain.com/docs/tutorials/) walkthroughs
94-
- [Langhain Forum](https://forum.langchain.com)
95-
- [API Reference](https://api.js.langchain.com)
50+
- [Getting started](https://docs.langchain.com/oss/javascript/langchain/overview): Installation, setting up the environment, simple examples
51+
- [Learn](https://docs.langchain.com/oss/javascript/langchain/learn): Learn about the core concepts of LangChain.
52+
- [LangChain Forum](https://forum.langchain.com): Connect with the community and share all of your technical questions, ideas, and feedback.
53+
- [Chat LangChain](https://chat.langchain.com): Ask questions & chat with our documentaiton.
9654

9755
## πŸ’ Contributing
9856

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

10361
Please report any security issues or concerns following our [security guidelines](https://github.com/langchain-ai/langchainjs/blob/main/SECURITY.md).
104-
105-
## πŸ–‡οΈ Relationship with Python LangChain
106-
107-
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.

0 commit comments

Comments
Β (0)