langchain-ai/langchainjs

The agent engineering platform

LangChain.js – A Toolkit for Building LLM‑Powered Apps (JavaScript/TypeScript)

What it is – LangChain.js is an open‑source framework that lets you assemble “chains” of language‑model calls, tools, vector‑store look‑ups, and other components into full applications. It provides a set of standard interfaces (agents, models, embeddings, retrievers, memory, etc.) and a large catalogue of ready‑made integrations, so you can swap providers or add new services without rewriting your code.

Why you might care

  • Plug‑and‑play data augmentation – Connect an LLM to external APIs, databases, or file systems with a few lines of code.
  • Model‑agnostic – The same chain works with OpenAI, Anthropic, Cohere, Azure, HuggingFace, etc.; just change the model config.
  • Rapid prototyping – High‑level “chains” let you get a working demo quickly, while lower‑level primitives give fine‑grained control when you need it.
  • Production‑ready tooling – Built‑in hooks for monitoring, evaluation, and debugging via the LangSmith platform, plus patterns for deployment on serverless, edge, or browser environments.
  • Active ecosystem – Companion packages such as Deep Agents (higher‑level agents with planning and sub‑agents), LangGraph (low‑level workflow orchestration), and a growing list of integrations (vector stores, tools, etc.).

Key pieces of the ecosystem

Component Purpose
Deep Agents (JS) Higher‑level agent library that adds planning, sub‑agents, and file‑system utilities on top of LangChain.
LangGraph Low‑level framework for building reliable, stateful agent workflows with custom memory and human‑in‑the‑loop steps.
LangSmith SaaS platform for testing, monitoring, and debugging LLM applications; includes deployment support.
Integrations Ready‑made adapters for chat/embedding models, vector stores, toolkits, and many cloud services.

Where it runs – Written in TypeScript, LangChain.js works in Node.js (ESM & CommonJS, versions 20‑24), Cloudflare Workers, Vercel/Next.js (browser, serverless, edge), Supabase Edge Functions, browsers, Deno, and Bun.

Getting started – Install with any npm‑compatible manager:

npm install -S langchain   # or pnpm add langchain, yarn add langchain

Then follow the official docs (https://docs.langchain.com/oss/javascript/langchain/overview) for a “Hello World” chain, or dive straight into the Deep Agents guide for more sophisticated agents.

Community & contribution – The project welcomes code, docs, and infrastructure contributions. See CONTRIBUTING.md for guidelines and the LangChain forum/chat for support.


All details above are taken directly from the repository’s README.

Related

  • Project
  • Project
  • Project
  • Project
  • Project