General model of economics, economics as mathematical structure Contrary to the common view, the physics is all about models, there are no such thing as law of nature, because every physical law has its applicability range and therefore all of laws as models. But any physical law derives from one principle - https://en.wikipedia.org/wiki/Principle_of_least_action - any particle theroy (there are hundreds of them) is written as the model Lagrangian and then variational principle is applied to arrive at dynamical equations and observable quantities that can be corroborated in experiments.

My question is - is there similar approaches, theories, most general models in economics from which every other model or economic law can be applied. If there are such models, then the automation of economics can be achieved (assuming that the automation of mathematics will be completed, e.g. with project http://ai4reason.org/).

I have heard definition - the economics is a tuple &lt;...> but I can not remember the book or article or the content of this tuple. Usually such tuples contain t]general mathematical objects: sets of agents with preference functions, set of interaction mechanisms (market system, competition patterns (monopoly etc.)), sets of external shocks (endogeneous factors) and so on...

I am seeking more for literature references, trends, keywords, not exhaustive answer. I can further research question by my own, but I should be informed from where to start my efforts.

Macroeconomics can (and should) be derived from the microeconomics, therefore I am seeking the model that states first principles - general microeconomic model (from which the general macro models could also be derived in the best case).
You may be interested in reading "Economic Models as Analogies", a 2014 article by Itzhak Gilboa, Andrew Postlewaite, Larry Samuelson and David Schmeidler, four well regarded economic theorists. They argue, somewhat contrary to your view of economic theorizing, that economic models are better viewed as "theoretical cases" rather than general rules akin to the laws of physics. Predictions are made by drawing analogies between the world in which the models live and reality. In Section 4 of the paper, they do propose a "model of economic models" that formalizes their argument. Although this model is probably not the one you were looking for, it may help clarify your (mis)perception of the methodology in theoretical economics. 

The paper's abstract is as follows: 


  People often wonder why economists analyse models whose assumptions are known to be false,
  while economists feel that they learn a lot from such exercises. We suggest that part of the
  knowledge generated by academic economists is case-based rather than rule-based. That is, instead
  of offering general rules or theories that should be contrasted with data, economists often analyse
  models that are ‘theoretical cases’, which help understand economic problems by drawing
  analogies between the model and the problem. Thus, economic models, empirical data,
  experimental results and other sources of knowledge are all on equal footing, that is, they all
  provide cases to which a given problem can be compared. We offer complexity arguments that
  explain why case-based reasoning may sometimes be the method of choice and why economists
  prefer simple cases.