onAgentBeforeClose

Deprecated

Use onAgentClosing instead

Replace with

import ai.koog.agents.core.feature.handler.AgentClosingContext
onAgentClosing(handler)

Appends a handler called before an agent is closed. This allows for additional behavior to be executed prior to the agent being closed.