Generally, if it is legal for two persons who are not living together to enter into an agreement, it also is legal for the couple living together to enter into a similar agreement. The fact that two people are living together and unmarried does not make an agreement automatically illegal. So, if two people wish to agree about how much each will pay for rent, mortgage, utilities, groceries, auto expenses, etcetera, the agreement can be valid and enforceable. If one party does not keep his or her end of the bargain, that person can be sued.
If the loss of a large amount of money is involved, a lawsuit or threat of a lawsuit may be worthwhile. If the dollar amount is relatively small, the wiser course of action probably is to walk away, hopefully with some added wisdom for dealing with the next relationship. Similarly, if there is no practical way to collect the amount due from the person who broke a promise if, for example, the person has virtually no assets and no steady source of income a lawsuit is not likely to be worth the effort.