def get_agents(self, addr=True, agent_cls=None, include_manager=False):
        '''Get agents in the environment.
        :param bool addr: If ``True``, returns only addresses of the agents.
        :param agent_cls:
            Optional, if specified returns only agents belonging to that
            particular class.
        :param bool include_manager:
            If `True``` includes the environment's manager, i.e. the agent in
            the address ``tcp://environment-host:port/0``, to the returned
            list if the environment has attribute :attr:`manager`. If
            environment does not have :attr:`manager`, then the parameter does
            nothing.
        :returns: A list of agents in the environment.
        :rtype: list
        .. note::
            By design, manager agents are excluded from the returned lists of
            agents by default.
        '''
        agents = list(self.agents.dict.values())
        if hasattr(self, 'manager') and self.manager is not None:
            if not include_manager:
                agents = [a for a in agents if a.addr.rsplit('/', 1)[1] != '0']
        if agent_cls is not None:
            agents = [a for a in agents if type(a) is agent_cls]
        if addr:
            agents = [agent.addr for agent in agents]
        return agents