The KGP model of agency for global computing: Computational model and prototype implementation