Eccentric private eye Dirk Gently uses 'holistic' methods, believing everything in the universe to be connected. When hired to trace elderly Ruth's missing cat, Dirk, with down-trodden sidekick MacDuff, investigates a warehouse, which houses a strange contraption, which blows up. A connection is made to a missing billionaire, Gordon Way, who has been besotted with MacDuff's girlfriend Susan for over a decade. Dirk connects the dates when Ruth acquired her cat and when Susan threw over Way to solve a puzzle involving time travel and homicide, accounting for the missing...
Dirk's client David Edwards is found dead after claiming that the Pentagon are out to kill him. His widow hires Dirk to catch the murderer, telling him that her husband was working on top secret computer software which could spell danger if it fell into the wrong hands. Dirk believes there is a connection with his other client, Emma Reynolds' philandering husband Oliver, obsessed with the fact that his horoscopes keep coming true. Having shown that the horoscopes are a fraud Dirk sets out to find the real reason for Edwards' murder.
Accompanied by MacDuff, Dirk returns to St Cedd's Institute of Science and Technology, Cambridge, from which he had been expelled for cheating, as his former mentor Professor Jericho has asked for his help in guarding Elaine, a sophisticated robot named after his daughter, used in his research into artificial intelligence. When Elaine is stolen, Dirk investigates seeing Jericho's colleague Emelda as the prime suspect. MacDuff meanwhile is tempted to leave Dirk's agency as his girlfriend, Susan, has applied for a job in Cambridge.
Dirk is in the frame when two of his former clients are killed and plans to skip the country though he is waylaid when Melinda Fulstone asks him to identify her stalker - actually Dirk himself conducting an experiment. Dirk believes the murderer is Robbie Glover, whom he accidentally had convicted for killing his own brother - particularly when Robbie tries to strangle him. But soon Dirk works out that Robbie has been framed and that there is somebody nearer home with a grievance against him.