[[quoteright:248:http://static.tvtropes.org/pmwiki/pub/images/Dirk_Gently_Detective_3758.jpg]]
[[caption-width-right:248:Without a doubt, [[OverlyNarrowSuperlative the best time-traveling romantic detective ghost comedy ever written.]]]]

''Dirk Gently's Holistic Detective Agency'' is a 1987 novel by Creator/DouglasAdams, the first in the ''Literature/DirkGently'' series.

Dirk is a small-scale con artist whose latest scheme is working as a "Holistic Detective", who believes in the "fundamental interconnectedness of all things" and how that means that ''anything'' might prove useful in solving the ''whole'' cases of his clients -- which, the way he sees it, means that he can do anything he likes, even take a three-week tropical vacation, and still charge it to the client as an expense. Of course, by FinaglesLaw, ''somehow'' every mundane little job he starts off working on in each novel is somehow actually connected to the main plot, and ''he's'' the one who has to solve everything.

In this novel, while (supposedly) investigating the disappearance of an old woman's cat, Dirk stumbles into a plot by an [[NinjaPirateZombieRobot extraterrestrial ghost]] to undo his death with a TimeMachine. Too bad that would undo the creation of life on Earth! (It all MakesSenseInContext. Even the robot created to be religiously faithful in place of its creators.)

The novel started as a RecycledScript of Creator/DouglasAdams' ''Series/DoctorWho'' story [[Recap/DoctorWhoS17E6Shada "Shada"]], which got stuck in DevelopmentHell -- several characters and locations are recycled from the episode wholesale. It also borrows heavily from Adams' ''Doctor Who'' story [[Recap/DoctorWhoS17E2CityOfDeath "City of Death"]].

There is a second Dirk Gently novel, ''Literature/TheLongDarkTeaTimeOfTheSoul''.

!!This novel provides examples of:

* AbsentMindedProfessor: Professor Chronotis.
* ArbitrarySkepticism: Lampshaded. Richard expresses doubt at Dirk's theory involving ghosts. Dirk points out that he'd also doubted the time travel aspect until that was proven to him.
* BavarianFireDrill: Dirk's favorite way of getting places he shouldn't be.
* BeethovenWasAnAlienSpy: Or rather, [[Creator/SamuelTaylorColeridge Coleridge]] and [[Creator/JohannSebastianBach Bach]].
* BewareOfHitchhikingGhosts: The driver of a car is horrified when he sees the ghost of his boss appear in front the car. The ghost, on the other hand, is horrified to see another ghost ''in the car's passenger seat''.
* CaptainErsatz: Because of the first book's RecycledScript from [[Recap/DoctorWhoS17E6Shada "Shada"]], an abandoned ''Series/DoctorWho'' episode, [[spoiler:Reg is essentially a retired Time Lord with an unusual TARDIS]].
* ChekhovsArmoury: Dirk isn't wrong--''everything'' that happens in these books is ultimately important. The ''Dirk Gently'' books embody this trope really because they are all about the interconnectedness of everything. Chekov's Armoury isn't just a device Adams used, it's what he based the whole book on. A poem, a conjuring trick, and a ''stuck couch'' in the first few chapters are all linked by the end.
* TheFogOfAges: [[spoiler:Professor Chronotis]] suffers from this.
* GenreBusting: ''DGHDA'' is described by its author as a "detective-ghost-horror-who dunnit-time travel-romantic-musical-comedy-epic".
* HistoricalInJoke: The novel ties together the origins of life on earth, Creator/SamuelTaylorColeridge's epic poem "Kubla Khan", the extinction of the dodo, the career of Buxtehude, and dozens of other epochal or trivial events into an excellent approximation of a coherent plot.
* ImpersonatingAnOfficer: Used by Dirk as part of his BavarianFireDrill.
* IrrevocableMessage: Which Richard attempts to revoke by [[spoiler:breaking into his girlfriend's apartment (while possessed by a ghost). And he ultimately ''succeeds'', for altogether more convoluted reasons ...]]
* LaserGuidedKarma: Whatever Dirk claims to believe in order to extract cash from gullible people invariably turns out to really be true, but always in such a way that he looks bad, sometimes in such a way that he suffers physical or emotional trauma, and never in such a way that he gets the money.
* LiteraryWorkOfMagic: Creator/SamuelTaylorColeridge's poems contain secret messages conveyed to him while he was under the influence of [[spoiler:an alien ghost, as part of plan to wipe out the human race]].
* MagiciansAreWizards: Reg performs an impossible magic trick to entertain a restless little girl at a formal dinner. Nobody but Dirk realizes that it's genuinely impossible, and he decides to investigate.
* MisappliedPhlebotinum: Reg has a [[spoiler:time machine]] and he uses it to watch television.
-->'''Dirk''':You have a [[spoiler:time machine]] and you use it for... watching television?
* NoBadgeNoProblem: Dirk does this as part of the workings of his Holistic Detective Agency when he has a mystery that actually interests him rather than one that involves tricking old ladies into letting their cats loose. The local inspector Sergeant Gilks takes a rather dim view of this... along with Dirk's tendencies to be involved in highly peculiar situations that Gilks does not like very much in the first place, as well as his habits of removing or obscuring evidence...
* NotSoPhonyPsychic: When he was in university, Dirk [[PhonyPsychic posed as a psychic]], was uncannily right, and got arrested for it. He now spends a lot of time insisting to people who were there that he's ''not'' psychic. Usually they don't believe him and his reputation often precedes him.
** Played with, as Dirk built his reputation for being a psychic at university by repeatedly and publicly insisting he ''was not'', in any way, shape, or form, a psychic. [[SuspiciouslySpecificDenial Which nobody had ever actually suspected him of being until he started denying it]].
* OneSteveLimit: Averted with Gordon's sister Susan and secretary Susan at the office.
* OurGhostsAreDifferent
* {{Oxbridge}}: Features St. Cedd's College, a fictional college at the real Cambridge University.
* PeekabooCorpse: A ghost discovers ''his own'' corpse in a cupboard. [[CrowningMomentOfFunny And faints.]]
* PerpetualPoverty: Dirk never seems to have much money -- a RunningGag in ''Holistic Detective Agency'' is his secretary quitting over not getting paid -- and most certainly never gets paid by ''his'' clients. He manages to stay in his office, flat, etc, through arranging the situation so that it would be more inconvenient to actually eject him or force him to pay than just let him be and hope that he'll pay some day.
* PhoneCallFromTheDead: A guy makes a car phone call and starts talking into the answering machine, then gets killed. Just later his ghost tries to communicate by talking through the phone, which is recorded on the answering machine as well.
* PlugNPlayTechnology: [[JustifiedTrope justified]]
* RefusalOfTheCall: See Phony Psychic, above.
* ReligiousRobot: The Electric Monks; a malfunctioning one ends up involved in the plot.
* RippleEffectProofMemory: More prevalent here than usual; you have to lead a very sheltered life to never notice little discrepancies between your memories and reality.
* RubberBandHistory: Creator/SamuelTaylorColeridge finished writing "Kubla Khan" and nobody's ever heard of JohannSebastianBach's music. By the end of the novel, both of these have become our familiar versions of history. There's also a cautionary anecdote about inadvertant time travel resulting in the extinction of the dodo.
* SanDimasTime: There's a telephone in the time machine, which can be used to straightforwardly communicate with the present. (On the other hand, there's a sequence where a character goes on a six-week trip into the past, and returns moments after he left.)
* SchmuckBait: Dirk ''told'' his fellow students he wasn't psychic, no matter how much money they offered him to predict the upcoming exam questions. [[spoiler: Subverted, because he unintentionally predicted ''exactly'' what the questions would be.]]
* ShoutOut: A few to [[Franchise/TheHitchhikersGuideToTheGalaxy Adams' other series]]:
** Richard asks Dirk if he always carries a [[Franchise/TheHitchhikersGuideToTheGalaxy towel]] around.
** Reg says that moving through time and space is closer than going to the chemist's--the opposite comparison that the ''Guide'' makes, "I mean, you may think it's a long way down the road to the chemist, but that's just peanuts to space, listen..."
* StarfishAliens: [[spoiler: Living members of]] the alien race never appear, but the description in the opening scene reveals they have purple crinkly skin, a single eye but multiple mouths and noses, and a variable number of legs, but always a prime. The reason the Electric Monk looks exactly like a Caucasian human is so that no-one could possibly mistake it for a real person.
* StevenUlyssesPerhero: [[spoiler: Albert Ross]]
* SuspiciouslySpecificDenial: Deliberately invoked by Dirk at university. By carefully denying the most extraordinary things, he convinces his fellow students that he's a psychic, mystic, telepathic, clairvoyant, psychosassic, vampire bat.
-->What did "psychosassic" mean?\\
[[PerfectlyCromulentWord It was his own word and he vigorously denied it meant anything at all.]]
* TalkingInYourSleep: How Dirk's supposed psychic powers manifested.
* ThisIsAWorkOfFiction: ''Holistic Detective Agency'' disclaims any resemblance to real people "living, dead, or wandering the night in ghostly torment".
* TimeTravelTropes
* TriggerPhrase: "my maiden aunt from Winnipeg"
* ViewersAreGeniuses
* WhatHaveWeEar: One of the conjuring tricks Reg does.
* WhoWantsToLiveForever: Or, technically, be dead and floating around as a ghost forever.
----