Class ParallelAgent
java.lang.Object
com.google.adk.agents.BaseAgent
com.google.adk.agents.ParallelAgent
A shell agent that runs its sub-agents in parallel in isolated manner.
This approach is beneficial for scenarios requiring multiple perspectives or attempts on a single task, such as running different algorithms simultaneously or generating multiple responses for review by a subsequent evaluation agent.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ParallelAgent.Builder
builder()
protected io.reactivex.rxjava3.core.Flowable
<Event> runAsyncImpl
(InvocationContext invocationContext) protected io.reactivex.rxjava3.core.Flowable
<Event> runLiveImpl
(InvocationContext invocationContext) Methods inherited from class com.google.adk.agents.BaseAgent
afterAgentCallback, beforeAgentCallback, description, findAgent, findSubAgent, name, parentAgent, parentAgent, rootAgent, runAsync, runLive, subAgents
-
Method Details
-
builder
-
runAsyncImpl
protected io.reactivex.rxjava3.core.Flowable<Event> runAsyncImpl(InvocationContext invocationContext) - Specified by:
runAsyncImpl
in classBaseAgent
-
runLiveImpl
protected io.reactivex.rxjava3.core.Flowable<Event> runLiveImpl(InvocationContext invocationContext) - Specified by:
runLiveImpl
in classBaseAgent
-