def create_agent_if_not_exist(
        self, name: str, version: str
    ) -> Tuple[str, str]:
        """
        Args:
            name (str): unique name of the external agent
            version (str): version is mandatory for now
        Returns:
            Tuple[str, str]: resolved_name, version
        """
        resolved_name = name.upper()
        # Get the agent if it already exists, otherwise create it
        if not self.check_agent_exists(resolved_name):
            self._create_new_agent(resolved_name, version)
        else:
            # Check if the version exists for the agent
            existing_versions = self.list_agent_versions(resolved_name)

            if (
                existing_versions.empty
                or "name" not in existing_versions.columns
                or version not in existing_versions["name"].values
            ):
                self.add_version(resolved_name, version)
                logger.info(
                    f"Added version {version} to External Agent {resolved_name}."
                )
            else:
                logger.info(
                    f"External Agent {resolved_name} with version {version} already exists."
                )

        return resolved_name, version

        Args:
            name (str): unique name of the external agent
            version (str): version is mandatory for now
        Returns:
            Tuple[str, str]: resolved_name, version
        
src/connectors/snowflake/trulens/connectors/snowflake/dao/external_agent.py