Spy movies can be divided into two categories.

The first is cynical and non-heroic, with aspirations to political realism and an understanding of the dark side of human nature (The Spy Who Came In From the Cold, The Ipcress File, The Mask of Dimitrios, etc.). The second revels in fantasy, action and larger-than-life heroes and villains (The World Is Not Enough, Tomorrow Never Dies and the rest of the James Bond series). Its only purposes are escapism and fun.

This division can help us place the contrasting messages of two recently released espionage thrillers in their proper cinematic context. The Tailor of Panama, based on John le Carre's best-selling novel, is a tired example of the first category. A melancholy, ironic look at post-Cold War intelligence work in contemporary Panama, it takes predictable potshots at American foreign policy and former President George Bush. A shady British operative (Pierce Brosnan) recruits a local tailor (Geoffrey Rush) as a spy and uses his fabricated reports for personal gain, overturning the region's political stability in the process. Director John Boorman (Deliverance ) wallows in a trendy pessimism which somehow blames the United States for that nation's economic and moral corruption. It all rings false.

Spy Kids, which belongs in the second category, sounds a different note. Director Robert Rodriguez (Desperado ) takes the conventions of that often-violent genre and imaginatively reworks them into an enjoyable film with an uplifting message. Though the film may be too aggressive for many small children, older kids will enjoy it with their parents (see www.screen-it.com for a run-down of the content before you go). There's little attempt at realism in either plot or visuals. But the movie playfully dramatizes some larger truths about both children and parents.

It also assigns most of its heroic roles to Hispanic characters — an overdue move for mainstream family movies.

Gregorio and Ingrid Cortez (Antonio Banderas and Carla Gugino) are former secret agents who meet and fall in love when they're on opposite sides of an international espionage war. They marry and quit the spy game to raise two kids in what looks like the suburbs of either Texas or Southern California.

“We exchanged one life of adventure for another,” says Ingrid, giving voice to the movie's positive view of parenthood. Neither 8-year-old Juni (Daryl Sabara) nor 12-year-old Carmen (Alexa Vega) knows of their parents’ previous profession.

Gregorio, currently working as a management consultant, is drafted out of retirement for one final mission. Ingrid, who misses the excitement of international intrigue, can't resist going along. They suit up in the dashing black leather they used to wear, and Gregorio adds a fake pencil mustache to look right for the part. The kids are left in the care of friendly Uncle Felix (Cheech Marin), who turns out to be an ex-secret agent as well.

One of Juni's favorite TV shows is “Floop's Fooglies,” hosted by the seemingly cuddly Fegan Floop (Alan Cumming). But this kiddie hero is secretly scheming to take over the world with the evil Mr. Lisp (Robert Patrick), also a former spook.

When Ingrid and Gregorio stumble onto the bad guys’ nefarious plans, they are kidnapped, and Juni and Carmen are called to save them. This allows the kids to act out a primal childhood fantasy in which they have more power than the adults.

“My parents can't be spies,” Carmen cracks in disbelief. “They're not cool enough.” Conditioned by popular culture, kids today admire anyone who lives an edgy and adventuresome life, and Rodriguez cleverly presents the world of espionage from this point of view.

The filmmaker gives Juni and Carmen the kind of high-tech gadgets found in James Bond movies, but adapted to a pre-adolescent mentality. This means they get to be daring, cunning and heroic in ways that kids can only dream of.

When bad guys pursue them, Juni and Carmen escape in either a Super Guppy underwater vehicle or through the power of pint-sized jet packs attached to their clothes. They are also able to fight back by spitting out Electroshock Gumballs that are as potent as artillery projectiles.

The movie's stylish, surreal production design adds to the treat. Floop and his mild-mannered, mad-scientist assistant, Minion (Tony Shalhoub), are holed up in a curvilinear castle that looks like it was designed by Gaudi. There they have created a robot army of eerie youthful conquerors that seem to have stepped out of the sci-fi classic Children of the Damned.

Floop himself is guarded by the Thumb-Thumbs, a comic band of awkward storm troopers whose faces, arms and legs are thumbs. Imprisoned next to Ingrid and Gregorio are the mutant Flooglies who appear on Floop's TV show. They are captured secret agents whose heads and features have been stretched and smashed into weird shapes.

Spy Kids has more interesting action sequences and a more affirmative view of Latino culture than the pretentious The Tailor of Panama. And it never loses track of its positive theme.

Beneath the visual bravado and well-executed gags are lessons about the importance of family. In order to rescue their parents, Juni and Carmen must learn to rise above their constant bickering and make peace with a long lost relative. “This spy stuff is easy,” Carmen observes. “Keeping a family together is hard.”

Arts & culture correspondent John Prizer writes from Los Angeles.