While I don't think we live inside a simulation or that there is an outside,
you might enjoy the book Simulacron-3 [0] or its movie adaptation Welt am Draht [1]. It is about the protagonist realizing that they are an agent in an economic computer simulation.
[0]: https://en.wikipedia.org/wiki/Simulacron-3 [1]: https://en.wikipedia.org/wiki/World_on_a_Wire