The differences depend on the version.
The Detective Special is an all steel gun.
The Cobra and Agent are aluminum framed versions of it.
When the Cobra was introduced in 1950, it had the same long grip frame as the Detective Special.
The Agent had a short, "stubby" frame to reduce it's size and weight even more.
In the mid-1960's Colt changed all the small "D" framed guns to the stubby frame, and the only difference between the Cobra and Agent became the name on the barrel, and the Agent was still usually fitted with smaller grips.
Here's a picture of the old long grip frame Colt's and the short frame as used on the Agent, and the later models: