onAgentClosing

expect open suspend override fun onAgentClosing(eventId: String, executionInfo: AgentExecutionInfo, agent: AIAgent<*, *>)(source)

Invoked before an agent is closed to perform necessary pre-closure operations.

Parameters

eventId

The unique identifier for the event group.

executionInfo

The execution information for the agent environment transformation event

agent

The agent instance that will be closed.