# Class Callback (0.7.0)

0.7.0 (latest) 0.6.0 0.5.0 0.4.0 0.3.0

    Callback(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `python_code` | `str` Required. The python code to execute for the callback. This field is a member of `oneof`_ `callback`. |
| `description` | `str` Optional. Human-readable description of the callback. |
| `disabled` | `bool` Optional. Whether the callback is disabled. Disabled callbacks are ignored by the agent. |
| `proactive_execution_enabled` | `bool` 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. |