The shark seen with a human leg inside its stomach was partly inspired by Steven Spielberg's Tiburón (1975), a film director Kleber Mendonça Filho greatly admires which became a cultural monument of the 1970s and continues to be discussed today. The reference also connects personally to him, as his hometown of Recife faces real shark-related issues.
Members of the production team initially chose not to tell Tânia Maria that she would be acting opposite Wagner Moura, fearing it might make her nervous. They later changed their minds, worried she might be startled when meeting him on set - so they warned her in advance. Her reaction was simply: "Who is he?". She later explained that the last soap opera she watched was Pai Herói in 1979. Maria eventually grew very fond of Moura, whom she described as a kind and generous man.
Steven Spielberg's Tiburón (1975), which is referenced in the film, was coincidentally re-released (due to its 50th anniversary) in Brazilian theaters at the same time The Secret Agent was playing. In many cinemas, trailers for Tiburón (1975) were shown right before screenings of The Secret Agent, creating an unexpected link between the two films.
The part of Sebastiana was written specifically for Tânia Maria. Her real name is Sebastiana, just like the character. She has also been a smoker for over 65 years. Her appearance in this film came after her well-received background performance in director Kleber Mendonça Filho's previous film, Bacurau. Following that, she was invited to participate in other projects connected to the director, including the film Seu Cavalcanti and the upcoming series Delegado.
Several cultural references to the Brazilian state of Pernambuco's folkloric traditions are seen. In one scene, Marcelo (played by Wagner Moura) encounters a Carnival costume resembling a bear - a nod to "La Ursa", a traditional celebration popular in northeastern Brazil, especially in Pernambuco and Paraíba. The custom, believed to have been brought by European immigrants, derives from old circus and Romani performances where a "bear," its trainer (often called the "Italian" or "foreigner"), and a hunter would entertain crowds in exchange for money. The bear costume is typically made from fabric scraps, velvet, or burlap, and features a colorful papier-mâché mask resembling a bear's head.