Given what we learn in Reloaded and Revolutions, if the machines already know where Zion is, why do the Agents try to get the codes from Morpheus to locate it?
The Agents probably don’t know that the machines know where Zion is. Agents are simply programming constructs with a set purpose. They have little or no knowledge of the overriding system or their place in it. They just do what they’re programmed to do – and in this case, they’re programmed to seek out access codes. It’s all part of the control of the machines.