There's a longer history to the CIA's and the USA's involvement in Vietnam. In 1945 as WWII was drawing down in Asia and the Pacific, UK and US intelligence agents were sent to all Japanese occupied countries that hadn't been invaded by the US, Australia or Great Britain. Their mission was to learn who had opposed the Japanese with arms, and who had the support of the local populations. This happened throughout South East Asia, the former Dutch colonial Indonesian islands, and the Philippine Islands. The ultimate goal was to determine who should receive the surrender of the Japanese occupying forces. It was also the goal to prevent former colonial occupiers, such as France, the Netherlands, Great Britain, or the USA from continuing in their roles.
In the former French Indochina (now Vietnam, Laos, and Cambodia) the only choice was the Viet Minh, led by Ho Chi Minh. The French Colonial government had surrendered to the Japanese in 1941 without any fight at all. That advice from intelligence forces on the ground was followed in 1945, and continued until 1952 when the Republican Eisenhower administration replaced the Democratic Truman administration. Instead of supporting independence in Vietnam, US policy shifted to supporting the French Colonial regime. The reason for the reversal was anti-communism – the Red Scare.
This long sad history leads to the conclusion that intelligence on the ground all agreed that most Vietnamese people supported the independence forces led by the Viet Minh, which in 1954 became the North Vietnamese, and in 1975 became the Vietnamese. The politicians and higher ranking military that ignored that advice. We would all have been much better served if we had stuck to the original plan made in 1945.