added support for agents