In a workgroup,the agent want to talk with the customer from webchat,how can i do?

hello :

These Days I try to do some tests with smack api , and first i do this as following:

agentSession.addOfferListener(new OfferListener() {
public void offerReceived(Offer offer) {
offer.accept();
System.out.println("offer accepted " + offer.getSessionID());
}

public void offerRevoked(RevokedOffer revokedOffer) {
System.out.println("Offer was revoked: " + revokedOffer.getReason());
}
});

and then

how can i create a chat between the agent and the customer in webchat?

thank you very much!!!

hoping for your reply!!