langchainjs README

The project's README from github.com/langchain-ai/langchainjs. As one markdown file: README.md.

LangChain Logo

The agent engineering platform.

npm License: MIT Twitter

LangChain is a framework for building LLM-powered applications. It helps you chain together interoperable components and third-party integrations to simplify AI application development — all while future-proofing decisions as the underlying technology evolves.

[!TIP] Just getting started? Check out Deep Agents — a higher-level package built on LangChain for agents that have built-in capabilites for common usage patterns such as planning, subagents, file system usage, and more.

Documentation: To learn more about LangChain, check out the docs.

If you're looking for more advanced customization or agent orchestration, check out LangGraph.js, our framework for building agents and controllable workflows.

For an equivalent Python library, check out LangChain.

To help you ship LangChain apps to production faster, check out LangSmith, a unified developer platform for building, testing, and monitoring LLM applications.

⚡️ Quick Install

You can use npm, pnpm, or yarn to install LangChain.js

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

🚀 Why use LangChain?

LangChain helps developers build applications powered by LLMs through a standard interface for agents, models, embeddings, vector stores, and more.

Use LangChain for:

📦 LangChain's ecosystem

🌐 Supported Environments

LangChain.js is written in TypeScript and can be used in:

📖 Additional Resources

💁 Contributing

As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For detailed information on how to contribute, see CONTRIBUTING.md.

Please report any security issues or concerns following our security guidelines.

langchainjs (langchain-ai/langchainjs)

langgraph
Searching Database…

What is this?LangChain.js is a TypeScript framework for building LLM-powered applications, giving developers a standard interface for agents, models, embeddings, vector stores, and third-party integrations.
Is it a framework or a library?It is a framework/library you import into a Node.js or JavaScript project, not a standalone app; it provides composable building blocks (chains, agents, retrievers) rather than a GUI.
How do I add it to a project?Install it with npm, pnpm, or yarn, e.g. 'npm install -S langchain'.
Which runtimes can I use it in?It works in Node.js (ESM and CommonJS, versions 20.x/22.x/24.x), Cloudflare Workers, Vercel/Next.js, Supabase Edge Functions, browsers, Deno, and Bun.
Do I need LangGraph or LangSmith too, or is LangChain enough on its own?LangChain alone covers chains, models, and integrations, but for complex agent orchestration you're pointed to LangGraph.js, and for production monitoring/evaluation you're pointed to LangSmith — they're separate companion products.
Is there a Python version of LangChain?Yes, LangChain also has an equivalent Python library, and LangChain.js is its TypeScript/JavaScript counterpart.
What is Deep Agents?Deep Agents (JS) is a higher-level package built on top of LangChain for building agents with built-in planning, subagents, and file-system usage capabilities.
Why would I choose LangChain over writing raw API calls?LangChain gives you a standard interface across model providers, vector stores, and tools so you can swap models in and out and prototype rapidly without rebuilding integrations from scratch.
Who uses LangGraph in production?Companies like LinkedIn, Uber, Klarna, and GitLab reportedly use LangGraph, the lower-level orchestration framework in the same ecosystem, in production.
Size
686.9 MB
Stars
18.3K
Age
3y
Commits · 90 Days