(Hypothetical) Can one offer a homeless person a free room in exchange for 10 hours of their time a week?

Scenario I had in mind. Bob is destitute, and unable to get back on their feet on their own. Jeff has a spare room, but can't afford an extra head in the home unless they help out. Jeff has a hobby garden that he profits from, mostly in the form of a reduced grocery bill, and partly from farmer's market sales. If Bob works to grow his own food in the garden under the agreement that any extra goes to the Jeff to 'pay' for the rent is such an agreement legal? If not is there a way to make it legal that does not involve classifying Bob as an employee or independent contractor? Both Bob and Jeff agree the deal between them is fair.

Edit: Clarification