> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LangGraph overview

> Low-level orchestration framework and runtime for long-running, stateful agents

LangGraph is a low-level orchestration framework and runtime for long-running, stateful agents. You define workflows as graphs of shared state, nodes, and edges, and can mix deterministic steps with LLM-driven steps in the same graph.

LangGraph focuses on orchestration capabilities such as [durable execution](https://docs.langchain.com/oss/javascript/langgraph/persistence.md), [streaming](https://docs.langchain.com/oss/javascript/langgraph/streaming.md), and [human-in-the-loop](https://docs.langchain.com/oss/javascript/langgraph/interrupts.md). It does not prescribe prompts or agent architecture.

Before you start, learn the building blocks agents use, especially [models](https://docs.langchain.com/oss/javascript/langchain/models.md) and [tools](https://docs.langchain.com/oss/javascript/langchain/tools.md). Docs examples often use [LangChain](https://docs.langchain.com/oss/javascript/langchain/overview.md) for those integrations, but LangGraph does not require LangChain.

If you want a higher-level agent loop first, use [Deep Agents](https://docs.langchain.com/oss/javascript/deepagents/overview.md) or LangChain [agents](https://docs.langchain.com/oss/javascript/langchain/agents.md). Use LangGraph when you need explicit control over state and control flow.

**How LangChain products fit together**

* [Deep Agents](https://docs.langchain.com/oss/javascript/deepagents/overview.md) is an [agent harness](https://docs.langchain.com/oss/javascript/concepts/products.md#agent-harnesses-like-the-deep-agents-sdk): planning, subagents, filesystem tools, and context management on top of LangGraph.
* [LangChain](https://docs.langchain.com/oss/javascript/langchain/overview.md) is the agent framework: abstractions and integrations for models, tools, and agent loops.
* [LangGraph](https://docs.langchain.com/oss/javascript/langgraph/overview.md) is the orchestration runtime: durable execution, streaming, human-in-the-loop, and persistence.
* [LangSmith](https://docs.langchain.com/langsmith/observability.md) is the platform for tracing, evaluation, prompts, and deployment across frameworks.
* [LangSmith Engine](https://docs.langchain.com/langsmith/engine.md) detects issues in LangGraph agent traces and proposes fixes. You can open a pull request with the proposed fix from the Engine tab.
* [LangSmith Fleet](https://docs.langchain.com/langsmith/fleet/index.md) is the no-code agent builder for templates, integrations, and routine automation.

For a comparison of the open source stack, see [Frameworks, runtimes, and harnesses](https://docs.langchain.com/oss/javascript/concepts/products.md).

## &#x20;Install

```bash npm theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
npm install @langchain/langgraph @langchain/core
```

```bash pnpm theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
pnpm add @langchain/langgraph @langchain/core
```

```bash yarn theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
yarn add @langchain/langgraph @langchain/core
```

```bash bun theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
bun add @langchain/langgraph @langchain/core
```

Create a minimal graph:

```typescript theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import { StateSchema, MessagesValue, type GraphNode, StateGraph, START, END } from "@langchain/langgraph";

const State = new StateSchema({
  messages: MessagesValue,
});

const mockLlm: GraphNode<typeof State> = (state) => {
  return { messages: [{ role: "ai", content: "hello world" }] };
};

const graph = new StateGraph(State)
  .addNode("mock_llm", mockLlm)
  .addEdge(START, "mock_llm")
  .addEdge("mock_llm", END)
  .compile();

await graph.invoke({ messages: [{ role: "user", content: "hi!" }] });
```

For a full calculator agent, see the [LangGraph quickstart](https://docs.langchain.com/oss/javascript/langgraph/quickstart.md).

## Capabilities

LangGraph provides the runtime primitives for stateful, long-running workflows. It does not abstract prompts or force a fixed agent architecture.

* **Deterministic and agentic steps**: Combine hand-coded nodes with model-driven nodes in one graph.
* [**Persistence**](https://docs.langchain.com/oss/javascript/langgraph/persistence.md): Checkpoint state and resume after failures or pauses.
* [**Human-in-the-loop**](https://docs.langchain.com/oss/javascript/langgraph/interrupts.md): Pause execution, inspect or edit state, then continue.
* [**Memory**](https://docs.langchain.com/oss/javascript/concepts/memory.md): Short-term thread state and longer-term memory across sessions.
* [**Streaming**](https://docs.langchain.com/oss/javascript/langgraph/streaming.md): Stream tokens, state updates, and other events as the graph runs.

## Integrations, deployment, and observability

LangGraph works on its own. However, you can also pair it with other LangChain products:

> [card] [LangChain](https://docs.langchain.com/oss/javascript/langchain/overview.md)
>
> Integrations and agent abstractions built on LangGraph.

> [card] [LangSmith Agent Server](https://docs.langchain.com/langsmith/deploy-overview.md)
>
> Deploy and scale stateful agents, with visual prototyping in Studio.

> [card] [LangSmith Observability](https://docs.langchain.com/langsmith/observability.md)
>
> Trace requests, evaluate outputs, and monitor deployments.

## See also

* [LangGraph quickstart](https://docs.langchain.com/oss/javascript/langgraph/quickstart.md)
* [Graph API overview](https://docs.langchain.com/oss/javascript/langgraph/graph-api.md)
* [Frameworks, runtimes, and harnesses](https://docs.langchain.com/oss/javascript/concepts/products.md)
* [Incorporate existing code and other frameworks](https://docs.langchain.com/langsmith/deploy-other-frameworks.md) (wrap a non-LangGraph agent for LangSmith Agent Server)

***

[Connect these docs](https://docs.langchain.com/use-these-docs.md) to your agent of choice via MCP for real-time answers.

[Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/oss/langgraph/overview.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
