Class SequentialAgent
java.lang.Object
com.google.adk.agents.BaseAgent
com.google.adk.agents.SequentialAgent
An agent that runs its sub-agents sequentially.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SequentialAgent.Builderbuilder()static SequentialAgentfromConfig(SequentialAgentConfig config, String configAbsPath) Creates a SequentialAgent from configuration.protected io.reactivex.rxjava3.core.Flowable<Event> runAsyncImpl(InvocationContext invocationContext) Runs sub-agents sequentially.protected io.reactivex.rxjava3.core.Flowable<Event> runLiveImpl(InvocationContext invocationContext) Runs sub-agents sequentially in live mode.Methods inherited from class BaseAgent
afterAgentCallback, beforeAgentCallback, canonicalAfterAgentCallbacks, canonicalBeforeAgentCallbacks, close, description, findAgent, findSubAgent, fromConfig, name, parentAgent, parentAgent, rootAgent, runAsync, runLive, subAgents
-
Method Details
-
builder
-
runAsyncImpl
protected io.reactivex.rxjava3.core.Flowable<Event> runAsyncImpl(InvocationContext invocationContext) Runs sub-agents sequentially.- Specified by:
runAsyncImplin classBaseAgent- Parameters:
invocationContext- Invocation context.- Returns:
- Flowable emitting events from sub-agents.
-
runLiveImpl
protected io.reactivex.rxjava3.core.Flowable<Event> runLiveImpl(InvocationContext invocationContext) Runs sub-agents sequentially in live mode.- Specified by:
runLiveImplin classBaseAgent- Parameters:
invocationContext- Invocation context.- Returns:
- Flowable emitting events from sub-agents in live mode.
-
fromConfig
public static SequentialAgent fromConfig(SequentialAgentConfig config, String configAbsPath) throws ConfigAgentUtils.ConfigurationException Creates a SequentialAgent from configuration.- Parameters:
config- the agent configurationconfigAbsPath- The absolute path to the agent config file.- Returns:
- the configured SequentialAgent
- Throws:
ConfigAgentUtils.ConfigurationException- if the configuration is invalid
-