A model of spatial and temporal coevolution of a system of trading and producing agents is suggested. These agents can conditionally be mapped to producing and trading firms, while no difference between production and trade is suggested: what is produced is immediately traded. The model is both local and non-local from the perspective of how agents interact with each other and the territory. The model shows a phenomenon of "city" formation; a city is just a grid cell with a high concentration of agents. These cities experience complex coevolution.