This might be one or both of the books from Daniel Suarez's Daemon series, Daemon and FreedomTM. It doesn't match your description exactly, but there are elements of these books which are similar enough to your description that they may be the book(s) you are looking for.
The AI you refer to may either be the eponymous Daemon or an AI NPC named "Heinrich Boerner", a Nazi soldier in a video game called Over the Rhine who interacts with players and rewards them with things in the real world.
The first book begins with the murders of some employees of a video game company named Cyberstorm Entertainment; the murders were conducted by the Daemon, which was programmed to activate upon the death of its creator (the cofounder of Cyberstorm and creator of Over the Rhine) as an act of revenge.
The high school boy may match the character Brian Gragg, who plays Over the Rhine and becomes the first Daemon operative by solving real world puzzles created by the Daemon. I can't find Gragg's age in the books -- he's described as a high school dropout and is probably a little older than a high schooler (college age or just a little older than that) but he's close enough in age that he may be the one you're thinking of. He also attends a rave with a bunch of high schoolers near the beginning of the first book, which may give the reader the impression that he's a high schooler. By the second book there are many more Daemon operatives, including high schoolers.
Wikipedia's articles on Daemon and FreedomTM may include additional information that rings a bell for you.