“Parenthood” star Jason Ritter has been cast in Amazon’s upcoming legal drama “Goliath,” Variety has learned.

Ritter will play Joe Farley, a wry but savvy FBI special agent. “Goliath” will premiere on Amazon Prime Video on October 14, and stars Billy Bob Thornton and William Hurt, along with Olivia Thirlby, Maria Bello, Molly Parker, Nina Arianda and Tania Raymonde. The series is written by David E. Kelley and Jonathan Shapiro; executive produced by Kelley, Shapiro, Ross Fineman, Larry Trilling, and David Semel.

The drama centers around the ultimate David vs. Goliath battle fought in the 21st century American legal system. The series follows a down-and-out lawyer (Thornton) as he seeks redemption. His one shot depends on getting justice in a legal system where truth has become a commodity, and the scales of justice have never been more heavily weighed toward the rich and powerful.

Ritter can currently be seen as a recurring guest star on Comedy Central’s “Another Period” and HBO’s “Girls.” He recently filmed the feature “The Tale” opposite Laura Dern, and will next be seen in the film “Intervention,” directed by Clea Duvall, which premiered at Outfest in Los Angeles.

At the recent Television Critics Association summer press tour, Kelley elaborated on the differences between “Goliath” and his previous work on broadcast networks: “One of the nice things of doing a show for Amazon is that you’re allowed to be that complicated with your characters,” Kelley told reporters. “You don’t have to write your protagonists that reveal their redemptive souls at every turn. These people are flawed. Sometimes their flaws overshadow their positive attributes. They’re very complicated people.”