John Varley's short story Bagatelle has this plot.
Original publication appears to have been 1976. My copy is in the 1980 anthology The Barbie Murders (named after a short story in the volume, for anyone who's starting to get confused).
It opens
There was a bomb on the Leystrasse, level fourty-five, right outside the Bagatelle Flower and Gift Shoppe, about a hundred meters down the promenade from the Prosperity Plaza.
"I am a bomb," the bomb said to passersby. ...