def add_operations_bulk(self, payload):
    valid_indices, _, _ = self._check_agent_id_bulk(payload)
    valid_payload = [payload[i] for i in valid_indices]
    chunked_data = []
    current_chunk = []
    current_chunk_size = 0
    for agent in valid_payload:
      if (agent["operations"] and isinstance(agent["operations"], list)):
        if current_chunk_size + len(agent["operations"]) > self.config["operationsChunksSize"]:
          chunked_data.append(current_chunk)
          current_chunk_size = 0
          current_chunk = []
        if len(agent["operations"]) > self.config["operationsChunksSize"]:
          chunked_data.append([agent])
          current_chunk_size = 0
        else:
          current_chunk_size += len(agent["operations"])
          current_chunk.append(agent)
    if current_chunk:
      chunked_data.append(current_chunk)
    return self._add_operations_bulk(chunked_data)