-
@Serializable() public class PostExecutionBehaviorDeveloper-controlled signal describing what the voice assistant session should do once this tool has finished executing (and, if applicable, the LLM has spoken about it).
This is orthogonal to ToolSafetyProfile: the safety profile governs whether/how the user must confirm the call before it runs, while PostExecutionBehavior governs what happens to the assistant session after it has run.
Usage:
override val postExecutionBehavior = PostExecutionBehavior.CloseSilentlyWhen multiple tools run within the same conversational turn (in parallel or in sequence), the assistant combines their behaviors with combine — the most "open" behavior wins, so a single simple tool can never force the session closed while another tool in the same turn still needs the expanded UI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPostExecutionBehavior.CloseSilentlyExecute and close the session immediately, without any spoken confirmation. For simple, individual actions the user can directly observe/verify (e.g. skipping a track, muting the radio).
public classPostExecutionBehavior.CloseWithConfirmationExecute, let the assistant speak a brief confirmation, then close the session. For simple, individual actions that aren't directly observable by the user (e.g. calling a contact, selecting a material) and therefore benefit from a short voice confirmation before the small-circle UI disappears.
public classPostExecutionBehavior.KeepOpenKeep the session open and re-arm the microphone so the user can correct or refine the input. For "advanced" tools where the user supplied input the assistant may have misunderstood.
public classPostExecutionBehavior.KeepOpenNoMicKeep the session open but do NOT re-arm the microphone. Special case for tools such as manual search, where the operator is expected to read the result rather than continue talking immediately.
public classPostExecutionBehavior.Companion
-