Class SupervisorGraphBuildingStrategy
java.lang.Object
com.alibaba.cloud.ai.graph.agent.flow.strategy.SupervisorGraphBuildingStrategy
- All Implemented Interfaces:
FlowGraphBuildingStrategy
Strategy for building supervisor-based routing graphs. In a supervisor graph, an LLM
decides which sub-agent should handle the task, and sub-agents always return to the
supervisor after completion. The supervisor can then either route to another sub-agent
or mark the task as complete (END).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds a StateGraph based on the provided configuration.Returns the type identifier for this strategy.voidValidates that the configuration contains all required parameters for this strategy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.alibaba.cloud.ai.graph.agent.flow.strategy.FlowGraphBuildingStrategy
generateKeyStrategyFactory, processAgentKeyStrategies, processOutputKey
-
Constructor Details
-
SupervisorGraphBuildingStrategy
public SupervisorGraphBuildingStrategy()
-
-
Method Details
-
buildGraph
Description copied from interface:FlowGraphBuildingStrategyBuilds a StateGraph based on the provided configuration.- Specified by:
buildGraphin interfaceFlowGraphBuildingStrategy- Parameters:
config- the graph configuration containing all necessary parameters- Returns:
- the constructed StateGraph
- Throws:
GraphStateException- if graph construction fails
-
getStrategyType
Description copied from interface:FlowGraphBuildingStrategyReturns the type identifier for this strategy. This is used for registration and lookup purposes.- Specified by:
getStrategyTypein interfaceFlowGraphBuildingStrategy- Returns:
- the strategy type identifier
-
validateConfig
Description copied from interface:FlowGraphBuildingStrategyValidates that the configuration contains all required parameters for this strategy.- Specified by:
validateConfigin interfaceFlowGraphBuildingStrategy- Parameters:
config- the configuration to validate
-