LangGraph (JavaScript Docs)

langchain-ai.github.io
Developer Tools

LangGraph JS — used by Replit, Uber, LinkedIn, GitLab and more — is a low-level orchestration framework for building controllable agents.

llms.txt

LangGraph

Quickstart

These guides are designed to help you get started with LangGraph.

Concepts

These guides provide explanations of the key concepts behind the LangGraph framework.

  • Why LangGraph?: Motivation for LangGraph, a library for building agentic applications with LLMs.
  • LangGraph Glossary: LangGraph workflows are designed as graphs, with nodes representing different components and edges representing the flow of information between them. This guide provides an overview of the key concepts associated with LangGraph graph primitives.
  • Common Agentic Patterns: An agent uses an LLM to pick its own control flow to solve more complex problems! Agents are a key building block in many LLM applications. This guide explains the different types of agent architectures and how they can be used to control the flow of an application.
  • Multi-Agent Systems: Complex LLM applications can often be broken down into multiple agents, each responsible for a different part of the application. This guide explains common patterns for building multi-agent systems.
  • Breakpoints: Breakpoints allow pausing the execution of a graph at specific points. Breakpoints allow stepping through graph execution for debugging purposes.
  • Human-in-the-Loop: Explains different ways of integrating human feedback into a LangGraph application.
  • Time Travel: Time travel allows you to replay past actions in your LangGraph application to explore alternative paths and debug issues.
  • Persistence: LangGraph has a built-in persistence layer, implemented through checkpointers. This persistence layer helps to support powerful capabilities like human-in-the-loop, memory, time travel, and fault-tolerance.
  • Memory: Memory in AI applications refers to the ability to process, store, and effectively recall information from past interactions. With memory, your agents can learn from feedback and adapt to users' preferences.
  • Streaming: Streaming is crucial for enhancing the responsiveness of applications built on LLMs. By displaying output progressively, even before a complete response is ready, streaming significantly improves user experience (UX), particularly when dealing with the latency of LLMs.
  • Functional API: @entrypoint and @task decorators that allow you to add LangGraph functionality to an existing codebase.
  • FAQ: Frequently asked questions about LangGraph.

How-tos

Here you'll find answers to "How do I...?" types of questions.

These guides are goal-oriented and concrete.

They're meant to help you complete a specific task.

Fine-grained Control

These guides demonstrate LangGraph features that grant fine-grained control over the execution of your graph.

Persistence

Persistence makes it easy to persist state across graph runs (per-thread persistence) and across threads (cross-thread persistence).

These how-to guides show how to add persistence to your graph.

See the below guides for how-to add persistence to your workflow using the Functional API:

Memory

LangGraph makes it easy to manage conversation memory in your graph. These how-to guides show how to implement different strategies for that.

Human-in-the-loop

Human-in-the-loop functionality allows you to involve humans in the decision-making process of your graph.

These how-to guides show how to implement human-in-the-loop workflows in your graph.

See the below guides for how-to implement human-in-the-loop workflows with the Functional API.

Time Travel

Time travel allows you to replay past actions in your LangGraph application to explore alternative paths and debug issues. These how-to guides show how to use time travel in your graph.

Streaming

Streaming is crucial for enhancing the responsiveness of applications built on LLMs. By displaying output progressively, even before a complete response is ready, streaming significantly improves user experience (UX), particularly when dealing with the latency of LLMs.

Tool calling

Subgraphs

Subgraphs allow you to reuse an existing graph from another graph. These how-to guides show how to use subgraphs:

Multi-agent

See the multi-agent tutorials for implementations of other multi-agent architectures.

See the below guides for how-to implement multi-agent workflows with the Functional API:

State management

Other

Prebuilt ReAct Agent

See the below guide for how-to build ReAct agents with the Functional API:

LangGraph Platform

This section includes how-to guides for LangGraph Platform.

LangGraph Platform is a commercial solution for deploying agentic applications in production, built on the open-source LangGraph framework. It provides four deployment options to fit a range of needs: a free tier, a self-hosted version, a cloud SaaS, and a Bring Your Own Cloud (BYOC) option. You can explore these options in detail in the deployment options guide.

!!! tip

* LangGraph is an MIT-licensed open-source library, which we are committed to maintaining and growing for the community.
* You can always deploy LangGraph applications on your own infrastructure using the open-source LangGraph project without using LangGraph Platform.

Application Structure

Learn how to set up your app for deployment to LangGraph Platform:

Deployment

LangGraph applications can be deployed using LangGraph Cloud, which provides a range of services to help you deploy, manage, and scale your applications.

Assistants

Assistants are a configured instance of a template.

Threads

Runs

LangGraph Cloud supports multiple types of runs besides streaming runs.

Streaming

Streaming the results of your LLM application is vital for ensuring a good user experience, especially when your graph may call multiple models and take a long time to fully complete a run. Read about how to stream values from your graph in these how to guides:

Frontend & Generative UI

With LangGraph Platform you can integrate LangGraph agents into your React applications and colocate UI components with your agent code.

Human-in-the-loop

When creating complex graphs, leaving every decision up to the LLM can be dangerous, especially when the decisions involve invoking certain tools or accessing specific documents. To remedy this, LangGraph allows you to insert human-in-the-loop behavior to ensure your graph does not have undesired outcomes. Read more about the different ways you can add human-in-the-loop capabilities to your LangGraph Cloud projects in these how-to guides:

Double-texting

Graph execution can take a while, and sometimes users may change their mind about the input they wanted to send before their original input has finished running. For example, a user might notice a typo in their original request and will edit the prompt and resend it. Deciding what to do in these cases is important for ensuring a smooth user experience and preventing your graphs from behaving in unexpected ways. The following how-to guides provide information on the various options LangGraph Cloud gives you for dealing with double-texting:

Webhooks

Cron Jobs

LangGraph Studio

LangGraph Studio is a built-in UI for visualizing, testing, and debugging your agents.

Troubleshooting

These are the guides for resolving common errors you may find while building with LangGraph. Errors referenced below will have an lc_error_code property corresponding to one of the below codes when they are thrown in code.

Related

The AI Toolkit for TypeScript, from the creators of Next.js.

/llms.txt
136,985 tokens
Developer Tools

Meet the modern standard for public facing documentation. Beautiful out of the box, easy to maintain, and optimized for user engagement.

/llms.txt
5,436 tokens
/llms-full.txt
181,290 tokens
Developer Tools

Web development for the rest of us.

/llms.txt
602 tokens
/llms-full.txt
453,623 tokens
Developer Tools

Search through billions of items for similar matches to any object, in milliseconds. It’s the next generation of search, an API call away.

/llms.txt
15,715 tokens
/llms-full.txt
588,629 tokens
Developer Tools

Build and deploy reliable background jobs with no timeouts and no infrastructure to manage.

/llms.txt
12,202 tokens
/llms-full.txt
387,586 tokens
Developer Tools

Get the simple developer experience of SQLite in production, and scale your multi-tenant backend with unlimited databases.

/llms.txt
10,006 tokens
/llms-full.txt
163,317 tokens
Developer Tools

Upstash is a serverless data platform providing low latency and high scalability for real-time applications.

/llms.txt
52,307 tokens
/llms-full.txt
1,200,134 tokens
Developer Tools

One-click deployments built for teams, tuned for Laravel, loaded with tools and goodies you're going to love.

/llms.txt
565 tokens
/llms-full.txt
11,330 tokens
Developer Tools