ACD send data to remote system on agent transfer

I need to have an ability to send some data to the remote system right before the agent transfer occurs. What is the best way to handle that. I am on version 1.8. Is there a way to integrate AGI code into a dial plan to accomplish this feature?