On the design and construction of agent-mediated institutions