The Rossoneri were arguably the better side at San Siro but suffered a late double blow; Rodrigo Palacio winning the Derby della Madonnina for Inter Milan with a classy backheel before Sulley Muntari saw red.
A first defeat in six league games leaves Milan 13th in the Serie A table and only five points clear of the relegation zone, but Allegri took the positives from a spirited display while reminding critics he is fighting on three fronts this season.
He told acmilan.com: "We dropped off a bit for the last 20 minutes and we could have done better in the final third but I believe I the players and I have nothing to complain about.
"They did better than us in the last 20 minutes and they managed to surprise us late on.
"We have to improve in the league but we're the only Italian side in the last 16 of the Champions League. We also have the Coppa Italia.
"I saw a good game. Unfortunately we're behind in the league and we have to start winning."
Kaka, Andrea Poli and Mattia De Sciglio enjoyed the best chances to beat Inter goalkeeper Samir Handanovic while Mario Balotelli was uncharacteristically subdued during the first Milan derby of the season.
Rossoneri keeper Christian Abbiati was, like his coach, philosophical about the game itself but insisted the result had been hard to take.
"We were under the cosh for the first few minutes, then we came out well with a lot of possession," he said.
"We created a few chances, and they didn't, then in the second half we dropped off a bit and they came forward.
"There's a lot of bitterness. I've been here a long time and when we lose a derby, I suffer a lot.
"We played a very good game against a great team and we created chances as well but in the end, it's the result that counts.
"I'm Milanese and I've been at the club for a long time. Losing the derby hurts."