Kinda like court jester, I guess. Venting companion might be exactly as the name suggest; that is, she is someone whom the king tells about his problems and worries (vent).
I suspect that she actually said some of the things she thought out loud without herself knowing, like what she did with her friend Sara.