class Collective:
    """Collective class for managing a group of agents."""

    def __init__(self, collective_id):
        """
        Initialize a Collective.

        Args:
            collective_id: Unique identifier for this collective
        """
        self.collective_id = collective_id
        self.agents = []

    def register_agent(self, agent):
        """
        Add an agent to the collective.

        Args:
            agent: Agent to add
        """
        self.agents.append(agent)

    def remove_agent(self, agent):
        """
        Remove an agent from the collective.

        Args:
            agent: Agent to remove
        """
        if agent in self.agents:
            self.agents.remove(agent)

    def get_agents(self):
        """
        Get all agents in the collective.

        Returns:
            List of agents
        """
        return self.agents

    def __repr__(self):
        return f"Collective({self.collective_id}, agents={len(self.agents)})"