Luongo started his first game since March 27th against Carolina when he left after the first period following a collision with the Hurricanes' Radek Dvorak. Luongo sustained a mild concussion and missed three games.
The Flames won their second straight and fifth in their last eight.
The Panthers have lost five straight and eight of nine.
Calgary took just six shots in the second period but scored twice.
The Flames took a 1-0 lead on Agostino's wrist shot from the left circle that got past Luongo at 1:34. It was Agostino's first NHL goal, and came in his fifth game. He was acquired in a trade with Pittsburgh for Jarome Iginla on March 27.
The Panthers tied it less than a minute later on a power-play goal by Trocheck. MacDonald blocked a shot by Jimmy Hayes but the puck bounced out into the slot. Trocheck was there for the rebound and beat MacDonald on the stick side at 2:21.
Then, less than four minutes later, Jiri Hudler brought the puck from behind the net and passed across to Cammalleri in front. His wrist shot found the net at 6:09 for his team-leading 26th goal and 500th NHL point.
NOTES: Luongo celebrated his 35th birthday by playing in his 800th NHL game. ... Panthers F Brandon Pirri has 10 points in the last 14 games. ... Panthers F Brad Boyes missed the game with a sore back. ... Cammalleri has 19 points in his last 14 games. ... Hudler leads the Flames with 50 points (16 goals, 34 assists) in 71 games.