Minority Report

In April 2054, Washington, D.C.'s PreCrime police stops murderers before they act, reducing the murder rate to zero. Murders are predicted using three mutated humans, called "Precogs", who "previsualize" crimes by receiving visions of the future. Would-be murderers are imprisoned in their own happy virtual reality. The Federal government is on the verge of adopting the controversial program.
Since the disappearance of his son Sean, PreCrime Captain John Anderton has separated from his wife Lara and becomes a drug addict. While United States Department of Justice agent Danny Witwer is auditing the program, the Precogs generate a new prediction, saying Anderton will murder a man named Leo Crow in 36 hours. Anderton does not know Crow, but flees the area as Witwer begins a manhunt. Anderton seeks the advice of Dr. Iris Hineman, the creator of PreCrime technology. She reveals that sometimes, one of the Precogs, usually Agatha, has a different vision than the other two, a "minority report" of a possible alternate future; this has been kept a secret as it would damage the system's credibility. Anderton resolves to recover the minority report to prove his innocence.
Anderton goes to a black market doctor for a risky eye transplant so as to avoid the city-wide optical recognition system. He returns to PreCrime and kidnaps Agatha, shutting down the system, as the Precogs operate as a group mind. Anderton takes Agatha to a hacker to extract the minority report of Leo Crow, but none exists; instead, Agatha shows him an image of the murder of Ann Lively, a woman who was drowned by a hooded figure in 2049.
Anderton and Agatha go to Crow's apartment as the 36-hour time nears, finding numerous photos of children, including Sean's. Crow arrives and Anderton prepares to kill him, accusing him to be a serial child killer. Agatha talks Anderton out of shooting Crow by telling him that he has the ability to choose his future now that he is aware of it. Crow however begs to be killed, having been hired to plant the photos and be killed in exchange for his family's financial well being. Crow grabs Anderton's gun and pushes the trigger, killing himself. Anderton and Agatha flee to Lara's house outside the city for refuge. There they learn Lively was Agatha's drug-addicted mother who sold her to PreCrime. Lively had sobered up and attempted to reclaim Agatha, but was murdered. Anderton realizes he is being targeted for knowing about Lively's existence and her connection to Agatha.
Witwer, studying Crow's death, suspects Anderton is being framed. He examines the footage of Lively's murder and finds there were two attempts on her life, the first having been stopped by PreCrime but the second, occurring minutes later, having succeeded. Witwer reports this to the director and founder of PreCrime, Lamar Burgess, but Burgess responds by killing Witwer using Anderton's gun. With the Precogs still offline, the murder is not detected.
Lara calls Burgess to reveal that Anderton is with her, and Anderton is captured, accused of both murders, and fitted with the brain device that puts him permanently into a dreamlike sleep. As his body is deposited into the prison, the warden tells him, "that all your dreams come true.â
Agatha is reconnected to the PreCrime system. While attempting to comfort Lara, Burgess accidentally reveals himself as Lively's murderer. Lara frees Anderton from stasis, and Anderton exposes Burgess at a PreCrime celebratory banquet by playing the full video of Agatha's vision of Burgess killing Lively. A new report is generated at PreCrime: Burgess will kill Anderton. Burgess corners Anderton, and explains that as he could not afford to let Lively take Agatha back without impacting PreCrime, he arranged to kill Lively following an actual attempt on her life, so that the murder would appear as an echo to the technician within PreCrime and be ignored. Anderton points out Burgess's dilemma: If Burgess kills Anderton, he will be imprisoned for life, but PreCrime will be validated; if he spares Anderton, PreCrime will be discredited and shut down. Anderton reveals the ultimate flaw of the system: once people are aware of their future, they are able to change it. Burgess shoots himself.
After Burgess's death, the PreCrime system is shut down and all prisoners pardoned. Anderton and Lara are soon to have a new child together. The Precogs are sent to an isolated island to live their lives in peace.

Question: What does the brain device do?
Answer: puts him permanently into a dreamlike sleep