More flexible AgentFactory construction. getEnvironment is now retrieved (statically) from system parameters.