How, with complete markets, do we have a representative agent? I've read several texts stating that with a complete market assumption, there's always a representative agent lurking. How is it that by assuming complete markets, we're able to prove the existence of a representative agent?

What's the connection between both?

Any help would be appreciated.
It depends on what you want from a representative agent. What you get is a representative agent at the given prices. For any two commodities, you have relative prices. This is where market completeness comes in. All you have to do now is find a well-behaved utility function whose marginal rate of substitution between the commodities corresponds to the relative prices. You can even take the utility function to be linear:
$$u(x_1,x_2,\ldots,x_l)=\sum_{i=1}^l x_i/p_i.$$
Of course, the resulting "representative agent" is utterly useless for any comparative statics exercise or any welfare analysis.