Simplified the agent tracking method