[John Varley][1]'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 forty-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. ...


  [1]: http://en.wikipedia.org/wiki/John_Varley_%28author%29