The visitors opened the scoring with a well-worked try inside 13 minutes as Pepito Elhorga cut in from the left flank and touch down near the posts.
Morrisson Faaletino added the conversion as Agen doubled their lead, surging through for a brilliant score. However, Faaletino was injured in the process and was helped off before Elhorga slotted the conversion.
Edinburgh came alive on the stroke of half-time when Marcus di Rollo was just beaten to the touchdown following a crafty kick ahead by John Senio. They broke their points duck on 70 minutes when substitute Ross Rennie was credited with the try after another drive by the home forwards.
Duncan Hodge converted but Rupeni Caucaunibuca sealed it for Agen with a stoppage-time try.
Agen scorers: Tries: Elhorga, Faaletino, Caucaunibuca. Cons: Faaletino, Elhorga.
Edinburgh: Tries: Rennie. Cons: Hodge.
AGEN: Elhorga, Vainqueur, Ahotaeiloa, Mignardi, Caucaunibuca, Faaletino, Morlaes, Popescu, Tiatia, Galasso, Stolz, Koulemine, Monribot, Som, Fonua.
Replacements: Lafforgue for Vainqueur (54), Tesquet for Faaletino (23), Fulton for Morlaes (55), L. Cabarry for Popescu (54), Guinazu for Tiatia (69), Lievremont for Monribot (75).
EDINBURGH: Southwell, Paterson, Di Rollo, Dewey, Cairns, Godman, Senio, Jacobsen, Lawrie, Dickinson, Pringle, Murray, Strokosch, MacDonald, Callam.
Replacements: Easson for Paterson (44), Hodge for Godman (52), Kelly for Lawrie (62), Brown for Dickinson (73), Turnbull for Pringle (49), Rennie for MacDonald (55).
Referee: Chris White (RFU).