LangGraph4j
Build stateful, cyclic, multi-agent LLM workflows inside Java applications.
- Source repo
- langgraph4j/langgraph4j
- Stars
- ★ 2.1k
- Last updated
- 4d ago v1.9.11
- FARS reviewed
- Nov 07, 2026 +3 new
- License
- MIT
- Primary language
- Java
- FA score
- 58/100 · Major gaps
At a glance
- How it runs
- Works with
- Universal · cross-platform
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- 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
- Website
- langgraph4j.github.io/langgraph4j ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-29latest release v1.9.11 (2026-11-29)+1.4 ★/day over 7 days
- Source review
- 58/100 · Major gaps
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.
- A Spring Boot or Spring AI team needs to coordinate model calls, tool execution, and conditional routing in a cyclic Java agent workflow.
- A LangChain4j developer wants a repository-provided AgentExecutor reference for implementing a ReAct-style agent.
- A backend team operates long-running workflows and needs to checkpoint execution in PostgreSQL, MySQL, Redis, or another supplied saver backend.
- A conversational application needs separate execution threads and checkpoint histories for multiple user sessions.
- An engineer debugging complex agent behavior wants streamed node-by-node state, checkpoint replay, and Mermaid, PlantUML, or Studio visualization.
- 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)
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- 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.
- 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?
Why each dimension lost points
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.
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.
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.
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.
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.
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.
- 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.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
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 ↗ -
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 ↗ -
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?
What Java version is required?
Can an interrupted workflow resume?
Can it be deployed directly as a standalone chatbot?
What prevents a cyclic graph from running forever?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.