emly,
The agents are on different ports, and configured to point at different server URLs? When you say there are problems with the agents, what happens? Errors? Crashing?
And just to double check what you've done portwise, I assume you set the agents to different ports using the agent.properties file. If not, edit the agent.properties file in the agent directory:
# The following are the properties that the Agent recognizes:
#
# agent.listenPort
# Default: "2144"
#
# Description: Port that the agent listens on.
#
Changing "2144" to the appropriate ports.
--jeremy