Class SupervisorNodeFromState
java.lang.Object
com.alibaba.cloud.ai.graph.agent.flow.node.SupervisorNodeFromState
- All Implemented Interfaces:
MultiCommandAction
MultiCommandAction that reads the sub-agent list from state key
"supervisor_next". The value is set by
MainAgentNodeAction (a
List of sub-agent names); no parsing of AssistantMessage or JSON text is needed here.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.slf4j.Loggerstatic final StringState key whereMainAgentNodeActionsets the routing decision: a List of sub-agent names (or ["FINISH"] for end). -
Constructor Summary
ConstructorsConstructorDescriptionSupervisorNodeFromState(String routingKey, List<Agent> subAgents, String entryNode) SupervisorNodeFromState(List<Agent> subAgents) -
Method Summary
-
Field Details
-
logger
public static final org.slf4j.Logger logger -
SUPERVISOR_NEXT_KEY
State key whereMainAgentNodeActionsets the routing decision: a List of sub-agent names (or ["FINISH"] for end). Read directly here, no parsing needed.- See Also:
-
-
Constructor Details
-
SupervisorNodeFromState
-
SupervisorNodeFromState
-
-
Method Details
-
apply
- Specified by:
applyin interfaceMultiCommandAction- Throws:
Exception
-