Callback

A callback defines the custom logic to be executed at various stages of agent interaction.

JSON representation
{
  "description": string,
  "disabled": boolean,
  "proactiveExecutionEnabled": boolean,

  // Union field callback can be only one of the following:
  "pythonCode": string
  // End of list of possible types for union field callback.
}
Fields
description

string

Optional. Human-readable description of the callback.

disabled

boolean

Optional. Whether the callback is disabled. Disabled callbacks are ignored by the agent.

proactiveExecutionEnabled

boolean

Optional. If enabled, the callback will also be executed on intermediate model outputs. This setting only affects after model callback. ENABLE WITH CAUTION. Typically after model callback only needs to be executed after receiving all model responses. Enabling proactive execution may have negative implication on the execution cost and latency, and should only be enabled in rare situations.

Union field callback. The callback to execute. callback can be only one of the following:
pythonCode

string

Required. The python code to execute for the callback.