#3386 client needs to pass clientinterface also when registering agent.
This allows us to handle callbacks when agents are freed.