Wondrous item, artifact, requires attunement
Written by the Hànz wizard Huang Fei late in the third dynasty of the Xin Empire, the codex automata — The Book of Machines — synthesized three thousand years of scholarly thought on magical constructs and was instantly recognized as the definitive work on the subject.
Machine Mind. You gain magic resistance.
Walking Tower. Once per year, as an action, you can summon a tall square metal tower, 20 feet on a side and 60 feet high, with windows on all sides and a battlement on top. The tower has six mechanical legs, granting it a movement speed of 24 miles per day. The door will only open on your command (bonus action); magic of less than 7th level will not open it. Each creature in the area where the tower appears must make a DC 13 Dexterity saving throw, taking 13d8 bludgeoning damage on a failed save, or half on a success. The roof, door, and walls each have 300 hit points, immunity to damage from nonmagical attacks except siege weapons, and resistance to all other damage. It cannot be repaired but can be dismissed as an action. An automated ballista protrudes from each wall, granting the tower a +12 Attack, +14 Power attack in battles. The tower counts as a tower stronghold and grants units defending it +2 Morale.
Iron Company. Once per month, as an action, you can summon the Iron Company, a unit of iron golems. The Iron Company rusts after 1 hour or two battles, whichever comes first.
Machine Lieutenant. By spending 1 week in a laboratory worth at least 1,000 gp, you can produce a machine lieutenant. You can only have one at a time. It is loyal to you and obeys your commands, but will not willingly move more than 30 feet away from you. If it is ever more than 30 feet away, it shuts down and awaits your return.
Master of Golems. No construct will attack you. As an action, you can make a Command check against a construct within 30 feet by rolling 1d20 and adding your Wisdom bonus + 2. If the result exceeds the construct's Hit Dice, the construct is yours to command for 1 hour, as though you were its creator.
Source: Strongholds & Followers