the IM framework is called telepathy and is 100 percent free and open. if by ym you mean yahoo messenger, if you enable extras-testing and install telepathy-haze.