This paper proposes a control method for in agents by switching their behavioral strategy between rationality and reciprocity depending on their internal states to achieve efficient team formation. Advances in computer science, telecommunications, and electronic devices have led to proposals of a variety of services on the Internet that are achieved by teams of different agents. To provide these services efficiently, the tasks to achieve them must be allocated to appropriate agents that have the required capabilities, and the agents must not be overloaded. Furthermore, agents have to adapt to dynamic environments, especially to frequent changes in workload. Conventional decentralized allocation methods often lead to conflicts in large and busy environments because high-capability agents are likely to be identified as the best team member by many agents, resulting in the entire system becoming inefficient due to the concentration of task allocation when the workload becomes high. Our proposed agents switch their strategies in accordance with their local evaluation to avoid conflicts occurring in busy environments. They also establish an organization in which a number of groups are autonomously generated in a bottom-up manner on the basis of dependability to avoid conflicts in advance while ignoring tasks allocated by undependable/unreliable agents. We experimentally evaluated our method in static and dynamic environments where the number of tasks varied.