LibreAI / AI Agents / langchainjs
// agents · langchain-ai/langchainjs

langchainjs

The JavaScript/TypeScript version of LangChain - the agent engineering platform

★ 18.2k stars⑂ 3.4k forksMITupdated 2026-10
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

langchainjs is an open-source ai agents project by langchain-ai (langchain-ai/langchainjs on GitHub). It has 18,248 GitHub stars and 3,422 forks, is released under the MIT license, and was last updated on GitHub on 8 October 2026.

GitHub stars
18,248
Forks
3,422
License
MIT
Last updated on GitHub
8 October 2026
Category
AI Agents
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Plan your JS/TS LLM app

    Decide the model, tools and data your agent or chain needs.

  2. Get the package

    Install langchain from npm with npm, pnpm or yarn - no clone needed for normal use.

  3. Add a provider package

    Install the integration package for your model provider and set its API key.

  4. Build your first chain or agent

    Compose a prompt, model and tool, run it, and iterate.

// features

Why people love it

Standard model interface

Call different LLM providers through one consistent interface and swap models with minimal code changes.

Agent building blocks

Tools, prompts, memory and retrievers composed into chains and agents.

Ecosystem integrations

First-party packages connect LangChain.js to major model providers, vector stores and tools.

Runs anywhere JS runs

Supported environments include Node.js and other JavaScript runtimes per the README.

LangGraph and LangSmith path

Part of the LangChain ecosystem, so you can graduate to LangGraph agents and LangSmith observability.

TypeScript-first

Ships full TypeScript types for editor-friendly development.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Get the source code from GitHub and enter the project directory.

    git clone https://github.com/langchain-ai/langchainjs.git
    cd langchainjs
  2. Install LangChain.js

    Install the core package with your package manager of choice.

    npm install -S langchain
  3. Import and build

    Import from the package in your TypeScript app and follow the docs' first-agent examples.

    import { ChatOpenAI } from "@langchain/openai"; // example provider package - see README resources
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains this project?

It is maintained by LangChain AI (langchain-ai) and contributors on GitHub.

Is it free to use?

Yes - LangChain.js is MIT licensed and free. Optional hosted services in the ecosystem (such as LangSmith) have their own pricing.

Does it need a paid API key?

The framework is free, but the models you call usually need your own provider API keys; local model integrations are also available.

How does it compare to alternatives?

Compared with the Python LangChain, this is the same platform philosophy for JavaScript/TypeScript stacks; compared with writing raw provider SDK calls, it adds portable abstractions at the cost of another layer to learn.

How do I get started?

Run npm install -S langchain, add your provider's integration package, and follow the documentation linked in the README.

// keep exploring

Similar tools

AI Agents

voltagent

AI Agent Engineering Platform built on an Open Source TypeScript AI Agent Framework

★ 10.7k starsMIT
View guide →
AI Agents

Langchain

The agent engineering platform

★ 147.4k starsMIT
View guide →
AI Agents

deepagents

The batteries-included agent harness from the LangChain team.

★ 30.0k starsMIT
View guide →
Agents

yao-meta-skill

YAO: rigorous engineering, evaluation, and governance for reusable agent skills.

★ 2.7k starsMIT
View guide →
Agents

KaibanJS

JavaScript framework for multi-agent systems with a Kanban-inspired design.

★ 1.5k starsMIT
View guide →
AI Agents

astron-agent

iFLYTEK's enterprise agentic workflow platform — SuperAgents with workflows, RPA and one-click deploy.

★ 8.9k starsApache-2.0
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if langchainjs is not the right fit.

Get langchainjs

Free and open — grab the source, star the repo, and start creating.