Filippo Maria Visconti died on 13 August 1447; he was not quite fifty-five years old.
Bianca Maria was his only direct heir, albeit illegitimate.
His death, without legitimate offspring, resulted in the creation of the short-lived Ambrosian Republic.
That same year, Agnese convinced Matteo Da Bologna, the condottiero who held the city of Pavia, to restore the city to her son-in-law, Francesco Sforza who had inherited it upon the death of Filippo.
Francesco subsequently took the title of Count of Pavia.

A revolt broke out in Milan on 24 February 1450, due to a famine in the city which resulted in rampant starvation and brought about much suffering to the populace.
One month later on 25 March, after the disputed succession to the duchy was decided in their favour consequent to a meeting of nobles and leading citizens, Francesco Sforza and Bianca Maria made their triumphal entry into the city as the Duke and Duchess of Milan.
The Ambrosian Republic had ended and was replaced by the Sforza dynasty which would rule Milan until 1535.
Agnese resided with them at the ducal court, overseeing the education of her grandchildren.
Extant diplomatic papers record that Agnese was a conspicuous participant in court functions,  until her death on 13 December 1465 at the age of fifty-four years.
Her daughter, Bianca Maria died three years later on 28 October 1468.
Francesco had died in 1466, and his eldest son Galeazzo Maria succeeded him as Duke of Milan.
Filippo Maria Visconti died on 13 August 1447; he was not quite fifty-five years old. Bianca Maria was his only direct heir, albeit illegitimate. His death, without legitimate offspring, resulted in the creation of the short-lived Ambrosian Republic. That same year, Agnese convinced Matteo Da Bologna, the condottiero who held the city of Pavia, to restore the city to her son-in-law, Francesco Sforza who had inherited it upon the death of Filippo. Francesco subsequently took the title of Count of Pavia.
A revolt broke out in Milan on 24 February 1450, due to a famine in the city which resulted in rampant starvation and brought about much suffering to the populace. One month later on 25 March, after the disputed succession to the duchy was decided in their favour consequent to a meeting of nobles and leading citizens, Francesco Sforza and Bianca Maria made their triumphal entry into the city as the Duke and Duchess of Milan. The Ambrosian Republic had ended and was replaced by the Sforza dynasty which would rule Milan until 1535. Agnese resided with them at the ducal court, overseeing the education of her grandchildren. Extant diplomatic papers record that Agnese was a conspicuous participant in court functions,  until her death on 13 December 1465 at the age of fifty-four years. Her daughter, Bianca Maria died three years later on 28 October 1468. Francesco had died in 1466, and his eldest son Galeazzo Maria succeeded him as Duke of Milan.
Agnese del Maino