A callback defines the custom logic to be executed at various stages of agent interaction.
| JSON representation |
|---|
{ "description": string, "disabled": boolean, "proactiveExecutionEnabled": boolean, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "pythonCode": string // End of mutually exclusive fields. } |
| Fields | |
|---|---|
description |
Optional. Human-readable description of the callback. |
disabled |
Optional. Whether the callback is disabled. Disabled callbacks are ignored by the agent. |
proactiveExecutionEnabled |
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. |
| The callback to execute. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
pythonCode |
Required. The python code to execute for the callback. |
| End of mutually exclusive fields. | |