langchainjs  by langchain-ai

JS framework for building context-aware LLM apps

Created 2 years ago
15,676 stars

Top 3.1% on SourcePulse

GitHubView on GitHub
Project Summary

LangChain.js is an open-source framework for building context-aware and reasoning applications powered by large language models (LLMs). It provides composable tools and off-the-shelf chains for developers to integrate LLMs with external data sources, enable autonomous agentic behavior, and manage model interactions.

How It Works

LangChain.js offers a modular architecture with core components for Model I/O (prompts, LLM interfaces), Retrieval (data augmentation), and Agents (autonomous decision-making). It emphasizes composability, allowing developers to combine these building blocks or use pre-built chains. LangGraph.js, a companion library, enables the creation of stateful, multi-actor applications by modeling execution flows as graphs, supporting complex agentic workflows with streaming and human-in-the-loop capabilities.

Quick Start & Requirements

  • Install: npm install -S langchain or yarn add langchain or pnpm add langchain
  • Supported Environments: Node.js (18.x+), Cloudflare Workers, Vercel/Next.js, Supabase Edge Functions, Browser, Deno.
  • Documentation: https://js.langchain.com/docs/

Highlighted Details

  • Composable components for LLM interaction, retrieval, and agentic workflows.
  • LangGraph.js for building stateful, multi-actor LLM applications.
  • Integrates with LangSmith for production monitoring and evaluation.
  • Supports Node.js, browser, and serverless/edge environments.

Maintenance & Community

  • Actively developed by the LangChain AI team.
  • Open to contributions.
  • Security guidelines available for reporting issues.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial and closed-source applications.

Limitations & Caveats

The project is a JavaScript/TypeScript port of the Python LangChain library, and while designed for seamless integration, direct feature parity or identical serialization behavior between the two may not always be guaranteed.

Health Check
Last Commit

21 hours ago

Responsiveness

1 day

Pull Requests (30d)
298
Issues (30d)
71
Star History
264 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Magnus Müller Magnus Müller(Cofounder of Browser Use), and
83 more.

langchain by langchain-ai

0.4%
116k
Framework for building LLM-powered applications
Created 2 years ago
Updated 1 day ago
Feedback? Help us improve.