Split the Agent class into AgentReference and Agent.
Agent becomes a usual class, like any other in the object store. Object name generation (agent's and others) is now handled in the separate AgentReference. The previous situation created race conditions.