That veteran charmer Frank Langella is at it again. This delightful comedy, set in the “near future,” features a retired jewel thief whose exasperated son (James Marsden) shows up with a talking robot to help provide care for dad, who’s having memory problems.

Irascible, long-divorced Frank wants nothing to do with cheery but demanding Robot (voiced by Peter Sarsgaard) — at least until he realizes his new companion isn’t programmed to obey the law, and has an electronic brain that gives him real potential as a safecracker.

Frank persuades Robot that it would be therapeutic to rob an obnoxious young millionaire (Jeremy Strong) who is privatizing the local library (the setting is Cold Harbor, NY) into a bookless community center.

But what will Frank do when he realizes that his new friend’s computer memory is the main evidence linking him to the crime?

The feature directorial debut of Jake Schreier, has a smart script by C.D. Ford and an impressive supporting cast that includes Susan Sarandon as a librarian who serves as Frank’s only human friend; Liv Tyler as his clueless daughter who turns Robot off; and Jeremy Sisto as a bumbling sheriff on Frank’s trail.

But it’s Langella’s crafty, heart-tugging burglar who steals every scene.