LangChain.js is the TypeScript implementation of LangChain, a framework for building applications with large language models (LLMs). It provides a standard interface for agents, chat models, embeddings, vector stores, retrievers, and tools, so you can chain interoperable components together and swap model providers without rewriting application code.
The library is positioned as the general-purpose layer of a wider ecosystem: Deep Agents (JS) is a higher-level package built on it for agents with planning, subagents, and file-system use; LangGraph.js is the lower-level orchestration framework for controllable, stateful agent workflows; and LangSmith is the platform for testing, monitoring, and deploying LLM applications. A Python equivalent is maintained separately.
Features
- Standard interfaces: one abstraction each for agents, models, embeddings, vector stores, and retrievers
- Integrations: a catalogue of model providers, tools and toolkits, vector stores, and retrievers
- Model interoperability: swap models in and out as the application evolves
- Abstraction layers: high-level chains for quick starts down to low-level components for finer control
- Ecosystem fit: Deep Agents for higher-level agents, LangGraph.js for orchestration, and LangSmith for monitoring, evaluation, and deployment
- Runtimes: Node.js 20.x, 22.x, and 24.x (ESM and CommonJS), Cloudflare Workers, Vercel and Next.js browser, serverless, and edge functions, Supabase Edge Functions, browsers, Deno, and Bun
