The suspect threw a metal object at the agent, but missed, and locked himself in the bathroom for hours, Adams said. Eventually, police apprehended the suspect in a crawl space inside the bathroom.
Police say the boy's mother, who reportedly owns the restaurant where her son works, eventually came outside and was detained.
The intersection of Glassell Street and Collins Street were closed earlier in the day.
City News Service contributed to this report.