First, there are enough different types of IP that each should be spelled out in the agreement -- or at least explicitly included in "IP" as defined in your agreement(s).
Second, if you really care about who owns what, you really ought to explicitly, completely, and thoroughly spell it out in your agreement(s).
I understand you asked what type of agreements you'd need. That's really a contract law question and beyond what we discuss here. In addition, contracts are matters of state law, so you'll need a lawyer in your state to help you out.
This is one area where an ounce of prevention is worth many pounds of cure. So, don't be cheap on getting help with agreement(s).
One the other hand, if you're asking because the joint venture is underway and people aren't sure who owns what, you should look at the employment contracts of the people involved and all agreements between the joint venture members. Again, ensuring that you've looked everywhere and are interpreting the agreements properly are matters of state law.