onAgentBeforeClose

fun onAgentBeforeClose(handler: suspend (eventContext: AgentBeforeCloseContext) -> 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.