Follow up question: Do we know if any US spies were living in the Soviet Union at the time, and potentially what happened to them?
Obviously when dealing with a topic more recent and with more a clandestine element, actual sources are difficult to pin down.
What we do know: During the chaos of the of Fall of the Soviet Union, and after the putsch on the Yeltsin government with many agents from the KGB involved, the KGB was dissolved, sort of. The major dissolution was more restructuring and splintering the KGB. The KGB was the Sword and the Shield of the Communist Party, it encompassed a great swath of power in the former Soviet Union. With it controlling internal security, border security, and foreign intelligence. The internal security service would be spun off to form first, the Ministry of Security, then the Federal Counter-Intelligence Service, or the F.S.K. which would later be named the Federal Security Service, F.S.B.
The foreign service part (The First Directive) of the KGB was reformed into the Foreign Intelligence Service, also known as the S.V.R. This agency would inherit foreign assets following the breakup of the Soviet Union. Following the immediate aftermath the SVR would have continued services as usual. However, there was major contractions in the budget of the SVR and the military in general which led to layoffs or recalling of agents from abroad. Notably of these were agents tied to business fronts for laundering and holding foreign currency. Yuriy Kobaladze, the head of the SVR press office wrote that "the Russian intelligence staff is now being reduced both in the centre and abroad, throughout the world." However, the USA was still seen as the main opponent even after the fall of the USSR.
We know spying continued. The biggest spy ever caught by the United States was an American turncoat who was arrested in 1993. Aldrich Ames is still serving his life imprisonment without parole. He was convicted on espionage by first giving information to the K.G.B. and then to the S.V.R. from the CIA. His betrayal cost the live of at least five American assets, many who were executed by the KGB after their treason was discovered.
There was also an issue of disillusionment in the KGB successor organizations. The KGB used Communist sympathy to recruit assets abroad. It also fit into their identity, it was clearcut who the bourgeois were. After the Fall, it became murkier. Especially during the turbulent years domestically. A lot of officers retired early and took up private business. There was definitely a loss of power and prestige following the fall. However, it did pick up after the first few years.
Now, this covers a lot of what we know about the SVR following the fall. It however does not cover the other large espionage agency that the Soviet Union used and continued to use with the Russian Federation; the GRU.
Relevant Sources:
The SVR: Russia's Intelligence Service, Gordon Bennet, The Conflict Studies Research Centre; https://fas.org/irp/world/russia/svr/c103-gb.htm
WHY I SPIED; Aldrich Ames, Tim Weiner, The New York Times; https://www.nytimes.com/1994/07/31/magazine/why-i-spied-aldrich-ames.html
Lenin's Tomb: The Last Days of the Soviet Empire, David Remnick
Robert Hanssen was working for the FBI and spying for the USSR and Russia (on and off) from 1979 until his arrest in 2001. He was also put in charge of the FBI search for "the Russian mole," himself. He broke off working with the Russians for short periods several times, including in 1991 during the collapse of the Soviet Union, as he feared his identity being revealed in the chaos. He resumed contact with the GRU the next year. Unusually, the Russians did not know Hanssen's identity, which gave him more flexibility.
I won't detail his whole bio or spying career here, but it is fascinating for students of espionage and the Cold War. I've read The Spy Next Door, there are other books as well that cover Hanssen's life and spying career. While certainly not a typical Russian agent, he was one of the highest placed.
TL;DR: Robert Hanssen broke off contact with the USSR as it collapsed & kept his head down, getting back into the spy game the next year after the chaos had subsided.