We normally "reach", "come to", or "arrive at" an agreement. We don't "get" an agreement, at least not in the context you have given. Therefore the second sentence is correct, the first isn't.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.