Here's an excerpt from the Kennedy Presidential Library:
...
American foreign policy after World War II had been based on the goal of containing Communism and the assumptions of the so-called "domino theorythat if one country fell to Communism, the surrounding countries would fall, like dominoes. The Eisenhower administration was concerned that if Vietnam fell under Communist control, other Southeast Asian and Pacific nations, including even the Philippines, would fall one by one. In response to that threat, the Southeast Asia Treaty Organization (SEATO) was formed in 1955 to prevent Communist expansion. President Eisenhower sent some 700 military personnel as well military and economic aid to the government of South Vietnam. This effort was foundering when John F. Kennedy became president.
In May 1961, JFK authorized sending an additional 500 Special Forces troops and military advisors to assist the pro‑Western government of South Vietnam. By the end of 1962, there were approximately 11,000 military advisors in South Vietnam.
...
A few weeks later, President Kennedy sent Secretary of Defense Robert McNamara and Chairman of the Joint Chiefs of Staff Maxwell Taylor to South Vietnam to provide their assessment of the situation. In their public report, they noted progress on the military front but difficulties with the political situation. They commented that by the end of 1963, the US program for training Vietnamese should have progressed to the point where 1,000 US military personnel assigned to South Viet-Nam can be withdrawn.
On November 1, 1963, the South Vietnamese government was overthrown. President Diem, refusing an American offer of safety contingent upon his resignation, was assassinated. In the final weeks of his life, Kennedy wrestled with the need to decide the future of the United States commitment in Vietnam. There were approximately 16,000 military advisors in South Vietnam. Whether or not Kennedy would have increased military involvement in Vietnam or negotiated a withdrawal of military personnel still remains a hotly debated topic among historians and officials who served in the administrations of President Kennedy and President Lyndon B. Johnson.
...