Silicon Valley firms are building surveillance and profiling tools to help government agents make sense of the massive amount of information available on social media and in publicly accessible data sets. Are they using cutting-edge technologies to keep Americans safe, or laying the groundwork for a police state?

The Palo-Alto based Palantir is one of the biggest so-called threat intelligence firms, and it's primary backer is Peter Thiel, the PayPal founder, Facebook board member, and Trump supporter.

Also an outspoken libertarian, Thiel told Fortune magazine he hopes Palantir's technology will help protect the civil liberties of Americans because, given the massive amounts of Americans' data the government takes in, "if we could help [agents] make sense of data, they could end indiscriminate surveillance."

Thiel believes Palantir's technology will prove crucial in stopping future terrorist attacks. Some insiders credit Palantir for enabling the government to find Osama bin Laden's hideout in 2011.

Edward Hasbrouck of the nonprofit Identity Project says this technology enables the government to violate civil liberties without necessary checks on its power. He compares it to the Berlin Wall. "By building checkpoints—by building the control mechanisms," Hasbrouck says, "we're already putting into place the infrastructure for those who will abuse them in the future."

Paul Scharre, a policy analyst who studies artificial intelligence and defense at the Center for a New American Security, says the public shouldn't fear artificial intelligence tools just because they're new and unfamiliar. "There's no technology that's just inherently good or inherently bad," says Scharre. "It's about how we're using it, and to what ends."

Watch the video above to learn more about artificial intelligence, its application in government, and what precautions we might take to preserve our civil liberties going forward.

Produced by Zach Weissmueller. Camera by Alexis Garcia, Justin Monticello, and Mark McDaniel.

"White Atlantis" by Sergey Cheremisinov is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.

"Glow in Space" by Sergey Cheremisinov is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.

"The Signals" by Sergey Cheremisinov is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.

"Clouds" by Sergey Cheremisinov is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.

"Comatose" by Kai Engel is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.

Subscribe to our YouTube channel.

Like us on Facebook.

Follow us on Twitter.

Subscribe to our podcast at iTunes.