Package com.google.adk.planner
Class SupervisorPlanner
java.lang.Object
com.google.adk.planner.SupervisorPlanner
- All Implemented Interfaces:
Planner
A planner that uses an LLM to dynamically decide which sub-agent(s) to run next.
The LLM is given a system prompt describing the available agents and their descriptions, the current state, and recent events. It responds with the agent name(s) to run, "DONE", or "DONE: summary".
-
Constructor Summary
ConstructorsConstructorDescriptionSupervisorPlanner(BaseLlm llm) SupervisorPlanner(BaseLlm llm, String systemInstruction) SupervisorPlanner(BaseLlm llm, String systemInstruction, int maxEvents) -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<PlannerAction>firstAction(PlanningContext context) Select the first action to execute.io.reactivex.rxjava3.core.Single<PlannerAction>nextAction(PlanningContext context) Select the next action based on updated state and events.
-
Constructor Details
-
SupervisorPlanner
-
SupervisorPlanner
-
SupervisorPlanner
-
-
Method Details
-
firstAction
Description copied from interface:PlannerSelect the first action to execute.- Specified by:
firstActionin interfacePlanner
-
nextAction
Description copied from interface:PlannerSelect the next action based on updated state and events.- Specified by:
nextActionin interfacePlanner
-