So, what have we learned from the visit of US President Joe Biden? He likes Ireland? Well, we kind of knew that well before he got here.

He is a strong supporter of the Good Friday Agreement? Ditto. He is very proud of his heritage? See answer one, above.

All of which is important – both to the president, and to Ireland. His unwavering support for the Good Friday Agreement – and that of like-minded US Senators and Representatives from both parties – was very important in steering the UK government back to the negotiating table with the EU to address the Northern Ireland Protocol in a serious fashion.

The resulting Windsor Framework – adopted in a pragmatic manner by the financially pressed UK government – defuses a source of tension between two important US allies, the EU and the UK.

It opens a door to a more rational and reasonable post-Brexit relationship. This is important to the United States because of the war in Ukraine: the last thing it wants to see is a debilitating political spat and possible trade war in the west of Europe when an actual war is raging in the east.

It also opens a door to the politicians in Northern Ireland to get back into the institutions established by the Good Friday Agreement. That too is important to healing the relationship between Britain and the EU, and between Britain and Ireland.

And its important in making an agreement, the Unites States played an enormous role in brokering work as intended. That's why the president went out of his way to thank Rishi Sunak and Ursula von der Leyen for "personal leadership" and getting that deal done.

He said the Windsor Framework "addresses the practical realities of Brexit and is an essential step to ensuring the hard-won peace of the Good Friday Agreement is preserved and strengthened". To a large extent that deal cleared the way for this trip to take place.

It was perhaps telling that the only discordant notes struck in media coverage of this trip came in the most vehemently pro-Brexit/anti-EU parts of the British media.

Joe Biden was praised for the message in his speech in Belfast

President Biden's speech in Belfast on Wednesday had drawn widespread praise for its deft messaging - to the unionist community and to the UK government. He spoke of the Ulster-Scots tradition and its long and deep involvement in the foundation and life of the United States.

Mostly it was targeted at the local politicians – in particular the DUP, though they were not named – or shamed. Instead, the president emphasised an optimistic vision of peace and prosperity – which he said go together.

"There are scores of major American corporations wanting to come here, wanting to invest," he told the audience, adding "In the 25 years since the Good Friday Agreement, Northern Ireland’s gross domestic product has literally doubled. Doubled. And I predict to you, if things continue to move in the right direction, it will more than triple."

Unspoken was the premise that such inward investment needs political stability – the quid pro quo for getting the Stormont institutions working again.

But at the heart of his speech was the peace agreement itself – the main reason to be here at this time. He reminded us of the power of the agreement around the world – "an incredible attestation to the power of democracy to deliver the needs for all the people".

And America needs that power of example too. As Senator Chris Murphy has pointed out, many members of the current US Congress came of age politically at a time of war – in Afghanistan and Iraq – and have experienced war as the principle feature of American foreign policy.

But the Good Friday agreement shows another side of US foreign policy – one founded on diplomacy, negotiation and compromise. Selling the optimism around the Good Friday Agreement is important in America as well as in Ireland. It is a US diplomatic win.

It also plays into Mr Biden's world view – articulated at length after his first big foreign trip to the G7 summit in Cornwall in 2021 – the contest between democracies and autocracies. That was before the war in Ukraine and was taken at the time to refer largely to the contest for economic relevance in the developing world, which could look to a rich, democratic but grasping west, or China with its rising prosperity, increasing technological sophistication but autocratic government. Which model of development and governance will win out in the 21st century?

For Mr Biden, the survival of the West as a dominant force means working together to deliver not just for Western citizens but for the globe as a whole – hence his emphasis on action to stop or mitigate the climate crisis.

These themes were on display in his speech in Dublin, most notably in his call for Ireland – and by extension the EU – to work together on regulation of new technologies, particularly Artificial Intelligence.

Joe Biden addressing the Houses of the Oireachtas

"Working in partnership with Ireland, the United States, together with the European Union and likeminded parties around the world, are going to ensure that those technologies are grounded in the same core values that we have championed for so long: democracy, human rights, freedom of opportunity for everyone – not just for some, for everyone," he said.

In doing so he may be pushing on an open door. In Dublin Castle a decade ago, the EU and the US started exploring a Transatlantic Trade and Investment Partnership (TTIP) that would aim to set the rules for the technologies that will dominate this century. Because if the US and EU don’t, the Chinese will.

The talks on TTIP ultimately went nowhere, but the ideas on regulatory leadership persisted, and have gained in strength as China has grown more powerful.

The pushback began with the move against Huawei equipment in the mobile phone networks and continues in the campaign against TikTok right now. It is one of the key levers in the president's world view that can be pulled to tip the contest for global leadership in favour of the Democracies, and away from the autocracies.

That’s why his comments about being at an inflection point, making decisions that will shape the next 40 or 50 years are significant.

As Ireland is a centre for US technology companies – and an EU state – they are an "invitation" to participate – or get on side –with the US led version of this regulatory convergence for strategic reasons.

This at a time when some EU states are wavering in taking a hard line against China because of their now deep links to the Chinese economy.

And just as there was re-assurance to Northern Ireland about US investment, the Dáil speech also had some reassuring messages about continued US investment in Ireland – along with a firm line about corporation tax – Mr Biden often states corporations must "pay their fair share", a line he uses often.

His administration is proposing a range of changes to the US corporation tax regime, particularly how it affects foreign earnings of US multinationals.

The intention is to raise an extra trillion dollars in corporation tax over the next decade to help pay for a massive Green Energy programme, including the subsidies to US based industry that has unnerved the EU in recent months.

But his final speech trod lightly on the policy themes – they were still there: climate change, combatting global hunger, Russia's war against Ukraine. But they were wrapped in a feel-good speech, rooted in Mayo - and rooting for Mayo in the GAA football championship.

President Biden's final speech in Ballina ended with a message of 'Mayo for Sam'

It was a high-octane performance from the president, who appeared rejuvenated after a long day of travelling and meeting people - including what may have been some emotional meetings in the Knock shrine and the Mayo Roscommon Hospice related to the death of his son Beau.

But President Biden seemed to draw energy from the crowd, delivering some familiar family tales and folksy yarns with verve. A global leader in local politician mode in a foreign country – and the Mayo crowd loved it. The weather stayed good, Ballina looked great in the stage lighting.

So, some serious public and political messaging, wrapped inside a pleasant presidential journey to a land he is clearly deeply comfortable in.

Does this trip help settle nerves in the Irish Government – over Northern Ireland, over Brexit, over corporation tax, over the War in Ukraine, over the direction of Western policy on China, over EU-US relations, over the commitment of the United States to fight climate change?

Yes, it probably does. At least for the time being. And in politics, that’s about as good as it gets.