Problem Description
When developing complex LLM applications using LangGraph4J, we often organize business modules as sub-agents (e.g., AssetAgent, OrderAgent) using the Agent Handoff pattern. Each sub-agent exposes specific functionalities through Tools. However, some functionalities require human interaction (e.g., multi-step form filling), which necessitates launching a subgraph with interruptible nodes from within a Tool method.
The key challenge is: How to synchronize state between a human-interactive subgraph and the main agent workflow, specifically:
- When a subgraph enters an interrupted state (awaiting human input), the main agent workflow should also pause
- After user input is received, both the subgraph and main agent should resume execution
- State persistence across this handoff process
Problem Description
When developing complex LLM applications using LangGraph4J, we often organize business modules as sub-agents (e.g., AssetAgent, OrderAgent) using the Agent Handoff pattern. Each sub-agent exposes specific functionalities through Tools. However, some functionalities require human interaction (e.g., multi-step form filling), which necessitates launching a subgraph with interruptible nodes from within a Tool method.
The key challenge is: How to synchronize state between a human-interactive subgraph and the main agent workflow, specifically: