langchainjs  by langchain-ai

JS framework for building context-aware LLM apps

created 2 years ago
15,295 stars

Top 3.3% 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)
95
Issues (30d)
64
Star History
967 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Didier Lopes Didier Lopes(Founder of OpenBB), and
1 more.

langgraph by langchain-ai

2.1%
17k
Agent orchestration framework for building controllable agents
created 2 years ago
updated 20 hours ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Carol Willing Carol Willing(Core Contributor to CPython, Jupyter), and
38 more.

langchain by langchain-ai

0.4%
113k
Framework for building LLM-powered applications
created 2 years ago
updated 22 hours ago
Feedback? Help us improve.