In 1784 Kant published an essay entitled "Idee zu einer allgemeinen Geschichte in weltbürgerlicher Absicht", which is available in English translation under the title "Idea for a Universal History from a Cosmopolitan Point of View" (translated by Lewis White Beck in 1963) [1].
The concept of the cosmopolitans, or citizens of the world has become somewhat politisized recently, with Theresa May refering to them as "citizens of nowhere" [2].
Kant likens human freewill to the unpredictability of the weather, noting that the weather, despite being, in Kant's time, unpredictable, maintains the conditions needed for plants to grow. Likewise, marriage may be a highly personal decision, but across a population there is a steady and predictable rate at which individuals take this decision.
Kant's idea starts from the premise that Nature has given reason to man and man alone, and that man exists to develop and perfect a society based on reason. Nature is capitalised in Lewis White Beck's translation, reflecting the way in which Kant, in this essay, raises Nature to a god-like status as the ultimate authority. The third of the nine theses in the essay has Nature willing that man should lift himself above animal existence through the exercise of reason. Kant appears to argue that we would be wise to devote ourselves to the goal that Nature has willed. The 2nd thesis points out that the full capacities of reason cannot be realised in an individual and will only reach fruition in the race as a whole. The term used by Kant, "Gattung", could also be translated as genus or type.
The 4th thesis highlights the role of antagonism as a means to develop humanity. This thesis explores the fact that antagonism is a intrinsic part of humanity, not only between individuals but also within individuals expressed as conflicting urges to associate with others for stimulation or to seek isolation for personal contemplation.
The 5th thesis postulates that the greatest problem facing mankind is the creation of a universal civic society, and 6th points out that this is very hard, not least because it is up to mankind, with all their imperfections, to create this universal society. He goes so far as to say that nothing perfectly regular van be constructed out of the crooked timber of humanity. He does not elaborate on how this "crooked timber" came into the possession of he glorious faculty of reason.
The 7th thesis highlights the critical role of a league of nations in creating a stable framework within which nations can develop a form of civic society appropriate to their values.The 8th posits that Nature has a inbuilt purpose and intent to promote progress, which is to be understood in terms of fully developing the capacity to reason.
The 9th thesis proposes that a world history developed from a philosophical perspective might contribute to the efforts to built the universal civic society.
The personification of Nature by Kant has interesting parallels in more recent discussions about Gaia by James Lovelock and others. Lovelock sees the natural world as having in-built self-regulation which is comparabel with the self-regulation in a living organism, with feedbacks established to maintain conditions within the organism which allow all parts of the organism to function smoothly.
[1] https://www.projekt-gutenberg.org/kant/absicht/Kapitel1.html