use agent method to send message.