Open-source embedding database for AI apps, storing documents and vectors to power semantic, hybrid and full-text search.
langchain-ai/langchainjs
A TypeScript framework for building LLM-powered applications and agents, with standard interfaces for models, tools, embeddings, and vector stores.
- Stars
- 18,286
- Forks
- 3,450
- Open issues
- 724
- Last commit
- 7 hours ago
What is it?
LangChain.js is the JavaScript and TypeScript version of the LangChain framework for building applications on large language models. It provides a standard interface for chat and embedding models, tools, vector stores, and retrievers, so developers can connect LLMs to external data sources and systems without tying their code to one provider.
The library installs from npm, pnpm, or yarn and runs on Node.js (ESM and CommonJS), Cloudflare Workers, Vercel and Next.js edge and serverless functions, Supabase Edge Functions, browsers, Deno, and Bun. Its abstractions let teams swap models as they test which one fits their application best.
For more advanced control over agent orchestration, the project points to LangGraph.js, and for production monitoring and evaluation it integrates with LangSmith. A higher-level package, Deep Agents, adds built-in planning, subagents, and file system use.
Key features
- 01Standard interfaces for chat models, embeddings, tools, vector stores, and retrievers.
- 02Swap model providers without rewriting application logic.
- 03Runs on Node.js, Deno, Bun, browsers, and several edge and serverless platforms.
- 04Integrates with LangSmith for debugging, evaluation, and monitoring.
- 05Supports both high-level chains for quick starts and low-level components for fine control.
Use cases
- Connecting an LLM to private documents or internal APIs through retrieval and tool calls.
- Building a chat or agent backend in a Next.js or Cloudflare Workers app.
- Prototyping LLM workflows and comparing different models behind one interface.
Topics
FAQ
- What is langchainjs?
- A TypeScript framework for building LLM-powered applications and agents, with standard interfaces for models, tools, embeddings, and vector stores. LangChain.js is the JavaScript and TypeScript version of the LangChain framework for building applications on large language models. It provides a standard interface for chat and embedding models, tools, vector stores, and retrievers, so developers can connect LLMs to external data sources and systems without tying their code to one provider.
- Is langchainjs free to use? What license does it have?
- langchainjs is open source under the MIT license. Check the license terms before using it in commercial products.
- Is langchainjs still maintained?
- Actively maintained. The last commit to langchainjs was on Oct 21, 2026.
- What can I use langchainjs for?
- Connecting an LLM to private documents or internal APIs through retrieval and tool calls. Building a chat or agent backend in a Next.js or Cloudflare Workers app. Prototyping LLM workflows and comparing different models behind one interface.
- Where can I get langchainjs?
- The source code and installation instructions are on GitHub: https://github.com/langchain-ai/langchainjs
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Python framework for building RAG, agent and document-processing applications that connect LLMs to your own data.
A local vector index and RAG toolkit that cuts storage by about 97% by recomputing embeddings on demand, so you can search personal data on your laptop.
Milvus is an open-source, distributed vector database for storing and searching embeddings at scale, used for AI search and RAG applications.
Epsilla is an open-source C++ vector database for embedding similarity search, with metadata filtering, hybrid search, and LLM retrieval integrations.
A Python framework for building LLM-powered applications and agents, with standard interfaces for models, embeddings, vector stores and third-party integrations.