On 9 May 1945, one day after the unconditional surrender of Nazi Germany, Agricola was captured by Soviet troops in Teplice–Šanov in Czechoslovakia (present-day Teplice in the Czech Republic), and was subsequently transported to the Soviet Union, where he was imprisoned in the camps No. 27, 62, 362, 476 and 48. Afterwards, he was transported to the Prison No. 1 in Kiev, in order to be tried for war crimes. A military tribunal of the Ukrainian Ministry of Internal Affairs in Kiev Oblast found him guilty under the Article 1 of the Ukaz 43 (19 April 1943) and sentenced him to 25 years of hard labor on 16 November 1948. He served his sentence in the labor camps of Karaganda in Kazakhstan and Vorkuta in the Komi Republic. Later, he was held at the Voikovo prison camp near Ivanovo, which was designated by the Soviet authorities for high-ranking Wehrmacht personnel.