Class LoopAgent
java.lang.Object
com.google.adk.agents.BaseAgent
com.google.adk.agents.LoopAgent
An agent that runs its sub-agents sequentially in a loop.
The loop continues until a sub-agent escalates, or until the maximum number of iterations is reached (if specified).
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic LoopAgent.Builder
builder()
protected io.reactivex.rxjava3.core.Flowable
<Event> runAsyncImpl
(InvocationContext invocationContext) Agent-specific asynchronous logic.protected io.reactivex.rxjava3.core.Flowable
<Event> runLiveImpl
(InvocationContext invocationContext) Agent-specific synchronous logic.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) Description copied from class:BaseAgent
Agent-specific asynchronous logic.- Specified by:
runAsyncImpl
in classBaseAgent
- Parameters:
invocationContext
- Current invocation context.- Returns:
- stream of agent-generated events.
-
runLiveImpl
protected io.reactivex.rxjava3.core.Flowable<Event> runLiveImpl(InvocationContext invocationContext) Description copied from class:BaseAgent
Agent-specific synchronous logic.- Specified by:
runLiveImpl
in classBaseAgent
- Parameters:
invocationContext
- Current invocation context.- Returns:
- stream of agent-generated events.
-