agentBeforeCloseHandler
A handler that is triggered before an agent is closed.
This variable represents an implementation of the AgentBeforeCloseHandler
functional interface, which defines the behavior to execute in the pre-closing phase of an agent's lifecycle. It receives the necessary context encapsulating specific details related to the agent and its closing event.
Use this handler to implement custom logic, resource cleanup, or other operations that should occur before the agent is terminated or closed.