Alan Judd is a novelist and biographer who worked in the British Foreign Office and is the authorized biographer of the founder of MI6. The opinions in this commentary are his own.

(CNN) Look away for a moment from the sparks flying from the big question of the day -- what General Flynn did or didn't say to the Russian ambassador , who knew what and when, who leaked, who else might be involved -- and consider how the new administration has got itself into this position . And how it might get itself out of it.

President Trump's current antagonistic stance towards his intelligence and security agencies dates, we all recall, from before his election , when he characterized them as part of the smug, Democrat-inclined Washington establishment that he aimed to overturn.

At the same time they -- the FBI in this case -- were in hot water with the Democrats for supposedly breaking rules by going public on investigations into Hillary Clinton's insecure emails. Intelligence is like sex when it gets mixed up with domestic politics: everyone takes sides and, in the end, all parties suffer. There are no winners.

Since taking office, President Trump has maintained his hostile attitude, despite appointing such people as Defense Secretary Jim Mattis and CIA Director Mike Pompeo who know what they're about and are getting on and doing it.

Policy with regard to Russia has become the toxic issue dividing the President -- in his own perception -- from an intelligence establishment that he sees as still mired in Cold War thinking and out to sabotage him and his government. He thinks he has nothing to learn from them.

He should think again and talk to them.

He should start by asking himself what intelligence agencies are for. In both the US and the UK systems, they exist primarily to bring truth to power, to tell governments not what they want to hear, but what they need to know about threats at home and abroad.

They may influence policy, but they don't determine it -- if the President seeks a more conciliatory policy towards Russia, then it is for him to bring it about. The intelligence agencies may not like it, but they are staffed by loyal government servants who will go along with it because their duty is to the government of the day.

At the same time, they will not hesitate to warn him of pitfalls: when the Russians are deceiving him, for instance, or when they have a concealed agenda, or when they have understood something differently to how he has understood it. That is their job and his job will be a lot easier if he embraces them, rather than chucks stones at their windows. For if he does embrace them, he would be the first to be told of any wrong-doing by his supporters and would have time to react before it leaks -- as in Washington nearly everything does, eventually.

In Britain, during the Second World War, Prime Minister Churchill had very frequent private meetings -- often while he was still in bed -- with the Chief of MI6 (Britain's CIA equivalent), which meant that he saw the latest intelligence before it came up to him through the system.

As a result, he was often better informed than his chiefs of staff.

After the war, Churchill's Labour Party successor, Clement Attlee, saw the head of MI5 (FBI equivalent) more frequently than any Prime Minister before or since. One of the main reasons was that the Prime Minister wanted to be told about members of his party who were spies or secret communists -- bad news for him, but it meant he could take pre-emptive action. He could be confident that the Leader of the Opposition -- Churchill by then -- would be told only about wrongdoers within his own party.

This is the kind of relationship President Trump could achieve with his agencies if he were prepared to follow normal procedures and encourage them to bring him the bad news in confidence. This is why he should talk to them directly, rather than via Twitter.

As for the leaks in question, does the President actually know where they came from? They could have come from within the agencies themselves, although they have a pretty good record for discretion where intercepts are concerned. They could have come from someone among those to whom they report -- their official and political customers.

Follow CNN Opinion Join us on Twitter and Facebook

If the President were to embrace his agencies, however, he -- and they -- should take care not to get too close. Once he discovered what they could tell him and do for him, the temptation to misuse them for his own political ends would be considerable -- an equal danger to both parties. Or he might be tempted to brag about what he knows, thereby compromising their sources.

Either way, whether embracing those who are there to help him or keeping them at a distance, President Trump would do well to adapt the wise words of one of his distinguished predecessors: talk quietly and listen long. And don't threaten the big stick.