So I read this story a few years ago and cannot find it. All I remember is that the main character is best friends with the guy that invented the first virtual reality game. He is dragged into it by his friend and play on his friend's team. Then there are government spies for some reason (I don't remember why) and the main character ends up falling in love with one of his team mates who turns out to be an AI.
Added: I'm pretty sure this is all set in the US and at least one of the spies is from the Australian government and the main character is a struggling freelance writer. I remember the main character's mom being really important to the story but I don't remember why. And one of the people on the team had a pet salamnder thing in the game.