I read this document:
http://xmpp.org/extensions/xep-0142.html#proto-agent-states
But in no time it explains how to get a workgroup through a user or agent.
Does the only way would be using web service? I would like to use only javascript for this.
I´m using openfire and spark.
Thanks
I solved it. The answer was at Service Discovery.
http://xmpp.org/extensions/xep-0142.html#disco