A new form of science is developed called Psychohistory, which is able to predict the future by using mathematics and statistical analysis. Hari Seldon the inventor of the new science predicts the end of the current multi galactic empire. He predicts the following of a 30.000 year long period of barbarianism. To shorten the length of the babaric era to 1000 years he forms two institutions called “The Foundation”, tasked to collect all knowledge known to man.
The books are a good read but I somewhat missed Asimov’s prophetic character. The second book is not without its lengths but does manage to return to an interesting ending.