LangGraph4j

Build stateful, cyclic, multi-agent LLM workflows inside Java applications.

Stars
★ 2.1k
Last updated
4d ago v1.9.11
FARS reviewed
Nov 07, 2026 +3 new
License
MIT
Primary language
Java

At a glance

How it runs
Library / SDKFrameworkWeb app
Works with
Universal · cross-platform
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Java 17+MavenAn LLM integration or custom Java logicNetwork access
Typical use
A Spring Boot or Spring AI team needs to coordinate model calls, tool execution, and conditional routing in a cyclic Java agent workflow.
Not a fit if
  • Teams wanting a ready-hosted agent service
  • Teams unwilling to design state, tools, and deployment themselves
  • Teams needing durable checkpoints without operating a database
Maintenance
Commits in the last 30 dayslast commit 2026-11-29latest release v1.9.11 (2026-11-29)+1.4 ★/day over 7 days

What does this agent do, and when should you use it?

LangGraph4j is a Java library for stateful, multi-agent LLM applications, with documented integration paths for LangChain4j and Spring AI. Applications describe execution with StateGraph, AgentState, nodes, and edges, then compile that definition into an immutable CompiledGraph. The runtime supports conditional routing, cycles, asynchronous nodes, streamed state updates, parallel branches, and nested subgraphs. Checkpoints make executions inspectable and resumable, with saver modules for MySQL, PostgreSQL, Redis, SQLite, Oracle, DynamoDB, CockroachDB, and Hazelcast. Its primary deployment boundary is a library embedded in a Java application, while Studio supplies an embeddable web interface for running and debugging graphs.

A developer defines an AgentState schema with Map<String, Channel<?>> and reducers, then registers NodeAction<S> or AsyncNodeAction<S> implementations in a StateGraph. Each node receives the current state, may call an LLM, execute a tool, or run custom Java code, and returns a Map<String, Object> of updates; channel reducers control how those updates are merged. Normal edges select a fixed successor, while addConditionalEdges(...) and addConditionalEntryPoint(...) choose routes from the current state, enabling branches and cycles. compile() validates the graph and produces a CompiledGraph; stream(...) yields state after each completed node, while invoke(...) returns the final state through a CompletableFuture after reaching END. CheckpointSaver records intermediate state for inspection and resumption, and PlantUML, Mermaid, and Studio expose the graph structure or execution visually.

  1. A Spring Boot or Spring AI team needs to coordinate model calls, tool execution, and conditional routing in a cyclic Java agent workflow.
  2. A LangChain4j developer wants a repository-provided AgentExecutor reference for implementing a ReAct-style agent.
  3. A backend team operates long-running workflows and needs to checkpoint execution in PostgreSQL, MySQL, Redis, or another supplied saver backend.
  4. A conversational application needs separate execution threads and checkpoint histories for multiple user sessions.
  5. An engineer debugging complex agent behavior wants streamed node-by-node state, checkpoint replay, and Mermaid, PlantUML, or Studio visualization.
  6. A platform team wants reusable subgraphs inside larger workflows and parallel execution for independent branches.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Ports
11434
Environment variables
MESSAGES_KEY
Runtime
Java 17

How do you install or deploy this agent?

Use Java 17 or later; the notebook tooling currently described under how-tos/ requires Java 22. For Maven, set version 1.8.24 and import the BOM:

<properties>
<langgraph4j.version>1.8.24</langgraph4j.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-bom</artifactId>
<version>${langgraph4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.bsc.langgraph4j</groupId>
<artifactId>langgraph4j-core</artifactId>
</dependency>
</dependencies>

Add the relevant LangChain4j, Spring AI, Studio, or CheckpointSaver modules as needed. The core library documents no mandatory API credential; credentials and network configuration depend on the chosen model or storage provider. The supplied integration examples use a local Ollama server at http://localhost:11434 with qwen2.5:7b.

How do you use this agent?

For a first run, create a state class extending AgentState and configure a messages channel with Channels.appender(ArrayList::new). Implement GreeterNode and ResponderNode as NodeAction classes, construct new StateGraph<>(SimpleState.SCHEMA, SimpleState::new), register them with addNode(...), and connect START -> greeter -> responder -> END. Call stateGraph.compile(), then iterate over compiledGraph.stream(Map.of(SimpleState.MESSAGES_KEY, "Let's, begin!")); every yielded item represents state after a node completes. Use invoke(initialState, RunnableConfig) when only the final state is needed. For resumable execution, provide a saver through CompileConfig.builder().checkpointSaver(...). A real model-backed agent additionally requires a LangChain4j or Spring AI chatModel, registered tools, and a compiled AgentExecutor.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Cycles and conditional edges are first-class execution primitives, covering retries, clarification loops, and tool-routing patterns that a conventional DAG cannot express directly.
  • The project documents both LangChain4j and Spring AI integration paths while allowing nodes to contain arbitrary Java logic.
  • Checkpointing extends beyond memory to dedicated MySQL, PostgreSQL, Redis, SQLite, Oracle, DynamoDB, CockroachDB, and Hazelcast saver modules.
  • The runtime combines CompletableFuture-based asynchronous work, streaming, parallel branches, subgraphs, and per-thread checkpoint histories.
  • PlantUML, Mermaid, and an embeddable Studio provide several concrete ways to inspect graph structure and execution.
Limitations
  • Stable 1.8.x modules require Java 17+, and the notebook tooling currently referenced under how-tos/ requires Java 22.
  • This is an embedded Java library rather than a ready-hosted agent service; adopters must supply the model, tools, state design, application boundary, and deployment.
  • Durable checkpointing adds a storage dependency and operational work; MemorySaver alone is not durable production storage.
  • Moving between LangChain4j and Spring AI requires integration changes because their model builders and tool annotations differ.
  • The supplied material does not establish native support for ChatGPT, Codex, Claude products, or direct OpenAI and Anthropic API adapters.

How does this agent compare with similar options?

LangGraph4j is explicitly inspired by the Python LangGraph project but targets Java and provides integration modules for LangChain4j and Spring AI. Compared with a conventional DAG-only workflow engine, it permits control flow to revisit earlier nodes, which fits agent retries, clarification steps, and repeated tool use.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
LangGraph4j This agent 58 · Major gaps Library / SDKFree + model costs ★ 2.1k 4d ago Java —
Spring AI Alibaba 48 · Major gaps FrameworkFree + model costs ★ 11k 1d ago Java —
ReachAI Enterprise Agent Platform 67 · Some gaps Self-hosted serviceFree + model costs ★ 1.1k 3d ago Java OpenAI API
LangChain4j 52 · Major gaps Library / SDKFree + model costs ★ 13k today Java OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
58/ 100 5-point scale 2.9 / 5
This review covers the source as of Nov 07, 2026. The project has shipped 3 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 13/29
Reliability 5/14
Adaptability 14/18
Convention 12/18
Effectiveness 10/13
Verifiability 4/8
Why each dimension lost points
Trust13 / 29 · 2.2/5

The materials show explicit graph structure, narrow CI contents: read permissions, and checkpoint save/restore capabilities, giving some evidence for least privilege and rollback. They do not show user confirmation, sensitive-data guidance, or a full data-flow account; one example enables request and response logging. Integrations and tools can call external services, while dependency-security practices are not documented. The MIT license identifies a copyright holder and the README attributes inspiration to LangGraph, but maintenance ownership and vulnerability reporting remain thin.

Reliability5 / 14 · 1.8/5

The README explains state, nodes, edges, compilation, and execution, but the example uses undefined inputs/config, the snapshot instructions mix 1.9.9 with snapshot wording, and the supplied revision cannot corroborate the release claims. These inconsistencies reduce the self-consistency score. The materials show no dependency pinning or availability strategy and offer little concrete failure diagnosis or error-handling guidance.

Adaptability14 / 18 · 3.9/5

The Java developer audience and scenarios are clear, covering linear flows, conditional routing, persistence, framework integrations, and visualization. StateGraph and node/edge abstractions allow customization, but the boundary between the library and application-level agents, tool permissions, and runtime limits is not fully described. Integration entry points are clear, though users must check Java and framework compatibility for their own environment.

Convention12 / 18 · 3.3/5

README organization, the pattern matrix, project structure, and module links support navigation; installation notes provide Maven coordinates and a Java 17 baseline. Examples help onboarding, but some are incomplete or appear stale, and FAQ and known-limitations coverage is sparse. The LICENSE is complete. Release lines and notes are present, but snapshot installation guidance is inconsistent. The security policy gives reporting channels and a response target, while concrete maintenance responsibility remains unclear.

Effectiveness10 / 13 · 3.8/5

Graph execution, shared state, asynchronous and streaming support, checkpoints, and integration modules provide a practical base for complex agent workflows, with modules selectable as needed. The introductory and tool examples help, but incomplete code and configuration increase adoption effort; the materials do not quantify operating costs or describe resource limits.

Verifiability4 / 8 · 2.5/5

The README gives concrete descriptions of core concepts and modules, while the security policy, license, and CI file provide partial corroboration. Multiple sources support the project structure and workflow capabilities, but undefined example variables and version claims weaken traceability. Documentation sometimes presents capabilities as facts without clearly distinguishing demonstrated behavior from promotional claims.

Risks and how to mitigate them
  • The README quick-start uses undefined inputs/config, and snapshot dependency guidance conflicts with its version example; check the API and Maven configuration for the version you adopt.
  • Tool and LLM integrations may make external calls, and an example enables request/response logging. Review tool permissions, logged content, and sensitive-data handling before deployment.
  • The security policy lists only 1.8.x as supported, which conflicts with the README's 1.9.x release line; maintainers should clarify security-support status.
Evidence confidence: Low Reviewed Nov 07, 2026 Reviewed revision 23aef94c1755 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/langgraph4j.svg)](https://followagents.com/en/agents/langgraph4j)
<a href="https://followagents.com/en/agents/langgraph4j"><img src="https://followagents.com/badge/langgraph4j.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v1.9.11 1.9.11
    Release notes excerpt
    [v1.9.11](https://github.com/bsorrentino/langgraph4j/releases/tag/v1.9.11) (2026-11-29) Features * studio/jetty add CORS support and default servlet configuration ([a6777c589549e5c](https://github.com/bsorrentino/langgraph4j/commit/a6777c589549e5c93b8a639f81896c16a1a7551a)) * studio/jetty add CORS support and default servlet configuration ([32d9801e270b703](https://github.com/bsorrentino/langgraph4j/commit/32d9801e270b703e89cda5be47cca273e7d34227)) …
    View on GitHub ↗
  2. v1.9.10 1.9.10
    Release notes excerpt
    [v1.9.10](https://github.com/bsorrentino/langgraph4j/releases/tag/v1.9.10) (2026-11-17) Features * DynamoDBSaverV2 archive on release with versioned tags and read-only dashboard (#514) ([adebe73ec56aa31](https://github.com/bsorrentino/langgraph4j/commit/adebe73ec56aa3158e1afa74788242fcab45cabc)) by @hemeshwarkonduru in https://github.com/langgraph4j/langgraph4j/pull/520 https://github.com/langgraph4j/langgraph4j/pull/521 …
    View on GitHub ↗
  3. v1.8.28 1.8.28
    Release notes excerpt
    [v1.8.28](https://github.com/bsorrentino/langgraph4j/releases/tag/v1.8.28) (2026-11-13) Bug Fixes - core preserve resolved state when updating as a node ([7e4767bd4074223](https://github.com/bsorrentino/langgraph4j/commit/7e4767bd40742233f22670884094c2e632449c99)) by @CCCLL in https://github.com/langgraph4j/langgraph4j/pull/518 > Save the complete state returned by nextNodeId directly instead of > merging it into the checkpoint again. This avoids reducing channel > values twice and restores conditional-edge removal and reset semantics. …
    View on GitHub ↗

FAQ

Does LangGraph4j require a paid cloud model?
No. Nodes may run custom Java logic, and both documented integration examples use a local Ollama model. Costs, credentials, and permissions depend on whichever external model service an adopter chooses.
What Java version is required?
The stable 1.8.x core, integration, and saver modules use Java 17+ as their baseline. The notebook tooling currently referenced in how-tos/ requires Java 22.
Can an interrupted workflow resume?
Yes, when a CheckpointSaver is configured. The project includes MemorySaver and lists persistent saver modules for several databases and caches; actual durability depends on the selected implementation and backend availability.
Can it be deployed directly as a standalone chatbot?
The core deliverable is a graph runtime embedded in a Java application, not a complete hosted chatbot. AgentExecutor integrations and Studio are available, but adopters still own the application endpoint, model, permissions, tools, and production deployment.
What prevents a cyclic graph from running forever?
The workflow designer must provide terminating conditions in edge and node logic and route execution to END. The material confirms cycle support but does not document an automatic guarantee against infinite loops.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts