How do you divide out responsibility for a bots actions between the person writing the code and the person running the program?
To divide the responsibility for a bots actions between the person writing the code and the person running the code you must take intent into account. Anything can be used for good or for evil, what matters if what is the person behind the action intending to do and why do they want to do it. For example, if someone creates a bot to help people find research sources for a project and then someone uses it to find illegal things on the internet, it's the responsibility of the person who ran the program because they chose to abuse the program. However, to protect themselves the person writing the code could also add in preventatives to the code to prevent abusive usage. Yet, the responsibility in the example I provided still falls onto the person who chose to use the bot for 'evil' because they are the person actively seeking the 'evil.'