Contractual agreements should always be used when engaging another person or company in any sort of business relationship involving intellectual property. For instance, if you are involved in R&D with another person or business a Joint Development Agreement should be used to clearly delineate who own various pieces of technology and/or improvements to them. Failing to establish clear terms at the front-end is likely to result in conflict later.