# langgraph4j Companion code for *LangGraph4j: Stateful Agent Graphs in Java* on [ankurm.com](https://ankurm.com). A loan-approval agent drawn as a graph with conditional routing, checkpoints, a human-in-the-loop pause and resume, and per-thread state. No model and no API key: every node is deterministic so the run is reproducible; swapping `assessRisk` for a model call changes one lambda. ```bash mvn test -pl langgraph4j # rewrites output/*.txt ``` | File | Role | |---|---| | `LoanState` | The shared state: typed accessors over a map, with an appender channel for the audit trail | | `LoanGraph` | Nodes, edges, the conditional route on risk, `interruptBefore("humanReview")`, the checkpoint saver | | `LoanGraphTest` | Five tests; each writes the matching `output/NN-*.txt` and asserts the same facts | Verified against `org.bsc.langgraph4j:langgraph4j-core` **1.9.5**, JDK 25, JUnit 6.1.3. The article carries the explanations; there is no `docs/` folder.