def run(
        self,
        video_id: str,
        index_type: str,
        scene_index_prompt=SCENE_INDEX_PROMPT,
        scene_index_config=SCENE_INDEX_CONFIG_DEFAULTS,
        collection_id=None,
        *args,
        **kwargs,
    ) -> AgentResponse:
        """
        Process the sample based on the given sample ID.
        :param str video_id: The ID of the video to process.
        :param str index_type: The type of indexing to perform.
        :param str collection_id: The ID of the collection to process.
        :param args: Additional positional arguments.
        :param kwargs: Additional keyword arguments.
        :return: The response containing information about the sample processing operation.
        :rtype: AgentResponse
        """
        try:
            scene_data = {}
            if collection_id is None:
                self.videodb_tool = VideoDBTool()
            else:
                self.videodb_tool = VideoDBTool(collection_id=collection_id)
            self.output_message.actions.append(f"Indexing {index_type} of video..")
            self.output_message.push_update()

            if index_type == "spoken_words":
                self.videodb_tool.index_spoken_words(video_id)

            elif index_type == "scene":
                scene_index_type = scene_index_config["type"]
                scene_index_config = scene_index_config[
                    scene_index_type + "_based_config"
                ]
                scene_index_id = self.videodb_tool.index_scene(
                    video_id=video_id,
                    extraction_type=scene_index_type,
                    extraction_config=scene_index_config,
                    prompt=scene_index_prompt,
                )
                self.videodb_tool.get_scene_index(
                    video_id=video_id, scene_id=scene_index_id
                )
                scene_data = {"scene_index_id": scene_index_id}

        except Exception as e:
            logger.exception(f"error in {self.agent_name} agent: {e}")
            return AgentResponse(status=AgentStatus.ERROR, message=str(e))

        return AgentResponse(
            status=AgentStatus.SUCCESS,
            message=f"{index_type} indexing successful",
            data=scene_data,
        )

        Process the sample based on the given sample ID.
        :param str video_id: The ID of the video to process.
        :param str index_type: The type of indexing to perform.
        :param str collection_id: The ID of the collection to process.
        :param args: Additional positional arguments.
        :param kwargs: Additional keyword arguments.
        :return: The response containing information about the sample processing operation.
        :rtype: AgentResponse
        
backend/director/agents/index.py