The visit came on the eve of the start of the announced withdrawal of a Russia-led military contingent of more than 2,000 troops that were sent to help restore order after peaceful protests gave way to violence and looting last week.
Dozens have died in the unrest that began with peaceful protests over an energy price hike. Hundreds of people were injured and police said they arrested more than 10,000 people.
“Tomorrow begins the organised withdrawal of the peacekeeping contingent” of the Collective Security Treaty Organization (CSTO), the alliance led by Moscow, said Tokayev.
Almaty showed further signs of a return to normal life Wednesday, with many more people out on the streets than last week and most restaurants and shops open.
AFP correspondents saw helicopters flying overhead as Tokayev met officials in the city where municipal services were cleaning up broken glass from shop windows smashed by looters.
Tokayev said Russian and allied forces “played a very important role in terms of stabilising the situation in the country”.
“Without a doubt, it was of great psychological importance in repelling the aggression of terrorists and bandits. The mission can be considered very successful,” he added.
In a meeting with CSTO Secretary General Stanislav Zas, Tokayev said the mission had “once again confirmed the value of the organization itself as a military-political structure” while raising its international status.
“The effectiveness of the organization has manifested itself quite clearly in this situation.”
Zas was quoted by Tokayev’s office as briefing the meeting “on the beginning of the withdrawal from our country of the contingents of the member states of the organization within the timeframe indicated by the head of Kazakhstan”.
Tokayev also spoke with relatives of law enforcement personnel killed in the riots and visited injured people in hospital.
Almaty airport, closed since last week after being ransacked, is due to resume service Thursday for national and international flights, according to the Kazakhstan Civil Aviation Committee.
While authorities have described the violence as the work of foreign “terrorists”, it erupted on the back of peaceful demonstrations over a rise in fuel prices and against a background of deteriorating living standards and endemic corruption.
The crisis also exposed rifts at the top of the national leadership, with Tokayev on Tuesday signalling a split with mentor and predecessor Nursultan Nazarbayev, 81, who ruled Kazakhstan for a quarter-century but has not been seen in public since the end of last year.
Karim Masimov, a top Nazarbayev ally, who prior to the crisis served as national security chief, has been arrested on treason charges linked to the unrest.