We present a multi-agent environment with self-interested agents whose aim is to perform tasks by forming simple teams with other agents. Team leaders recruit agents to join teams by proposing contracts that allocate various payoff shares to the team members. Contracts can be long-term (indefinite-length commitment with a buy-out penalty for leaving the team) or dynamic (commits the joining agent to the team only for a single task). We compare several alternative strategies for forming stable teams empirically and show that in the proposed environment, stable teams have greater organizational efficiency than dynamic teams. We also identify specific conditions and strategies for which stable teams have an advantage over dynamic ones.