Agreements: A Philosophical and Legal Study