How can I create an array of agents of same type?

In reply to SharonBeaulah:

Of course you can do this.But it is not needed.
But you do not need to paste the code again and again because the agent class definition ius needed only once. You can reuse the agent code from another project by passing only a link to the source code.