Class FlowGraphBuilder.FlowGraphConfig
java.lang.Object
com.alibaba.cloud.ai.graph.agent.flow.builder.FlowGraphBuilder.FlowGraphConfig
- Enclosing class:
- FlowGraphBuilder
Configuration class for graph building parameters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()chatModel(org.springframework.ai.chat.model.ChatModel model) conditionalAgents(Map<String, Agent> agents) customProperty(String key, Object value) org.springframework.ai.chat.model.ChatModelgetCustomProperty(String key) getHooks()getName()Sets the hooks for the graph.keyStrategyFactory(KeyStrategyFactory factory) Sets the main agent (e.g.voidsetChatModel(org.springframework.ai.chat.model.ChatModel chatModel) voidsetConditionalAgents(Map<String, Agent> conditionalAgents) voidvoidsetMainAgent(Agent mainAgent) voidvoidsetRootAgent(Agent rootAgent) voidsetStateSerializer(StateSerializer stateSerializer) voidsetSubAgents(List<Agent> subAgents) stateSerializer(StateSerializer stateSerializer) Sets the state serializer for the graph.
-
Constructor Details
-
FlowGraphConfig
public FlowGraphConfig()
-
-
Method Details
-
getName
-
setName
-
getKeyStrategyFactory
-
getStateSerializer
-
setStateSerializer
-
getMainAgent
-
setMainAgent
-
getRootAgent
-
setRootAgent
-
getSubAgents
-
setSubAgents
-
getConditionalAgents
-
setConditionalAgents
-
getChatModel
public org.springframework.ai.chat.model.ChatModel getChatModel() -
setChatModel
public void setChatModel(org.springframework.ai.chat.model.ChatModel chatModel) -
getHooks
-
setHooks
-
builder
-
name
-
keyStrategyFactory
-
rootAgent
-
mainAgent
Sets the main agent (e.g. ReactAgent) for supervisor flow. When set, routing decisions are taken from this agent's output instead of the built-in LLM.- Parameters:
agent- the main agent instance- Returns:
- this config instance for method chaining
-
subAgents
-
conditionalAgents
-
chatModel
public FlowGraphBuilder.FlowGraphConfig chatModel(org.springframework.ai.chat.model.ChatModel model) -
stateSerializer
Sets the state serializer for the graph.- Parameters:
stateSerializer- the state serializer to use- Returns:
- this config instance for method chaining
-
hooks
Sets the hooks for the graph.- Parameters:
hooks- the list of hooks to use- Returns:
- this config instance for method chaining
-
customProperty
-
getCustomProperty
-
getCustomProperties
-