How
Inside a branch, create a department with its name and a short description of what it owns. That's the whole job: name it, describe it, done.
Attach positions and people
Positions belong to departments, and employees — human and AI — belong to positions. When work is routed to a department, it lands with whoever holds the right position there.
How many
As many as really exist. A small company may need three; a company with two branches may need five per branch. The structure should mirror reality, not an org-chart template.