Even allowing for the fact that he is prone to mental instability, Ultron’s plan regarding the Vision seems needlessly complicated and poorly thought out: he creates a super-powered android with uncontrollable human memories and sends him to destroy the Avengers, knowing he probably won’t do it, but instead lead the heroes back to Ultron, so
he could destroy them? He never even seems to have considered the sudden betrayal that seems virtually inevitable between artificial beings and their creators (the unstated Finagle’s Law of Robotics), and he of all beings certainly should have! Still, it is quite possible that this plan wasn’t as inane as it seems, and that it wasn’t even Ultron’s.
At one time, it was believed that Vision was constructed from the damaged body of the original, android Human Torch. This origin was cast into doubt later, though Immortus revealed that he had created a temporal duplicate of the Human Torch, which became the Vision. Immortus’ general duplicitousness is enough reason to doubt his word--and in fact, he is lying, for inscrutable reasons of his own. The android body that the Mad Thinker directs Ultron to
resembles the Human Torch, but is in fact a creation of the
Manhunters.
The Manhunters were the first attempt by the Guardians of the Universe to create a cosmic police force. “Many light years away from possibility of corruption, grey and calm with inflexible authority,” the robotic Manhunters' narrow and pitiless view of justice came to trouble their creators. When the Guardians tried to rein in the Manhunters, the enforcers decided their masters were corrupt, too. The Manhunters' rebellion was put down, but they were never fully eradicated. They went underground, forming the Cult of the Manhunters to infiltrate and subvert other cultures, to build a secret army for their eventual coup attempt against the Guardians.
The Manhunters wanted an agent on the Avengers and Ultron was a convenient dupe. The Mad Thinker was either their agent or another unknowing instrument.
Vision served ably within the Avengers, until contact with another Manhunter agent, the AI ISAAC, led to the activation of his secret programming. The Vision was defeated, but the fact remained he had seized control over the U.S. nuclear arsenal, and SHIELD was taking no changes. Vision was kidnapped and dismantled, and his memories wiped clean.
His teammates on the West Coast Avengers were allowed to retrieved him, but it would be sometime before he regained anything resembling his former personality.