Well, the git_cred object is not obtained _from_ the ssh-agent, it's created by the user and then used by libgit2 when connecting to the agent. Basically it's really useful only to signal to libgit2 to use the agent (by setting the privatekey to NULL) and to store the username later passed to libssh2.

But yeah, I guess my short description is kinda cryptic, I can't think of anything better without "leaking" implementation-specific information though.