Majesty games unit ai

Ok so there is this game called majesty where its an rts. Here is the catch: you dont control the units.

Units are like player in an mmorpg where they cannot be directly ordered, instead they automatically buy stuff, explore or do some unique things their class can do.

All you can control are reward flags that can convince said units to move, the more gold the more likely they are to react to it.

Basically a city builder where you are building an rpg world. But here is the question:

Is it possible to make such an ai? And if so, can i also make an wnemy ai that can build aswell? (Although this is optional, as im planning on making the enemies just spawn randomly or by events)
(Ps i know you can make a city builder btw, so i dont have questions for that side)