How can I send a message to a 'type' of agent?

If you want to multicast a message, aka have one message be received by multiple agents, you can send the message to the agent_name field. agent_name is a special property (distinct from ‘agent_id’) which can be used as the receiver address for messages. Every agent will receive a message addressed to its name, even if there are multiple in a simulation. For instance if five agents have the agent_name dog, and an agent sends a message {“to”: “dog”, “type”: “whistle”, “data”: {}} all five agents will hear the whistle!

Check out more information on messages in our docs.