LangGraph provides both low-level primitives and high-level prebuilt components for building agent-based applications. This section focuses on the prebuilt, ready-to-use components designed to help you construct agentic systems quickly and reliably—without the need to implement orchestration, memory, or human feedback handling from scratch.

What is an agent?

An agent consists of three components: a large language model (LLM), a set of tools it can use, and a prompt that provides instructions. The LLM operates in a loop. In each iteration, it selects a tool to invoke, provides input, receives the result (an observation), and uses that observation to inform the next action. The loop continues until a stopping condition is met — typically when the agent has gathered enough information to respond to the user. Agent loop: the LLM selects tools and uses their outputs to fulfill a user request

Key features

LangGraph includes several capabilities essential for building robust, production-ready agentic systems:
  • Memory integration: Native support for short-term (session-based) and long-term (persistent across sessions) memory, enabling stateful behaviors in chatbots and assistants.
  • Human-in-the-loop control: Execution can pause indefinitely to await human feedback—unlike websocket-based solutions limited to real-time interaction. This enables asynchronous approval, correction, or intervention at any point in the workflow.
  • Streaming support: Real-time streaming of agent state, model tokens, tool outputs, or combined streams.
  • Deployment tooling: Includes infrastructure-free deployment tools. LangGraph Platform supports testing, debugging, and deployment.

High-level building blocks

LangGraph comes with a set of prebuilt components that implement common agent behaviors and workflows. These abstractions are built on top of the LangGraph framework, offering a faster path to production while remaining flexible for advanced customization. Using LangGraph for agent development allows you to focus on your application’s logic and behavior, instead of building and maintaining the supporting infrastructure for state, memory, and human feedback.

Package ecosystem

The high-level components are organized into several packages, each with a specific focus.
PackageDescriptionInstallation
langgraphPrebuilt components to create agentsnpm install @langchain/langgraph @langchain/core
langgraph-supervisorTools for building supervisor agentsnpm install @langchain/langgraph-supervisor
langgraph-swarmTools for building a swarm multi-agent systemnpm install @langchain/langgraph-swarm
langchain-mcp-adaptersInterfaces to MCP servers for tool and resource integrationnpm install @langchain/mcp-adapters
agentevalsUtilities to evaluate agent performancenpm install agentevals
/* ## Visualize an agent graph Use the following tool to visualize the graph generated by createReactAgent and to view an outline of the corresponding code. It allows you to explore the infrastructure of the agent as defined by the presence of:
  • tools: A list of tools (functions, APIs, or other callable objects) that the agent can use to perform tasks.
  • preModelHook: A function that is called before the model is invoked. It can be used to condense messages or perform other preprocessing tasks.
  • postModelHook: A function that is called after the model is invoked. It can be used to implement guardrails, human-in-the-loop flows, or other postprocessing tasks.
  • responseFormat: A data structure used to constrain the type of the final output (via Zod schemas).

Features

Graph

graph image
The following code snippet shows how to create the above agent (and underlying graph) with createReactAgent:
*/