The opening chapter of The Happiness Agent introduces us to Lorelai, a hacker who has figured out how to write and modify memories.
In the not-too-distant future, displays are captured on glasses and contacts. Implants allow people to control their pocket computers through thought. Memories are stored and can be reviewed. Up until now, though, no one has been able to modify them.
Lorelai is using her knowledge of memory alteration to try to improve people's lives by altering their bad memories. But such knowledge cannot go unnoticed, and such a well-meaning act can have far reaching consequences for everyone involved.