onAgentClosing

fun onAgentClosing(handler: suspend (eventContext: AgentClosingContext) -> Unit)(source)

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