Wikipedia on its page for Shamir's secret sharing scheme provides a python implementation that applies the idea. This algorithm will generate a (k, n) threshold scheme so for example we could split a secret in 6 parts and we would need only 3 of them to recreate it.
But isn't the idea of this scheme to be used by a number of various agents that each one will generate only a part of the key and share it? This way each agent can then create the secret key by combining the parts he will receive.
What would be the proper way to make this algorithm distributed and not generating everything in one computer?