{"record":{"id":"b2352913d060a8db","repo":"mem0ai/mem0","slug":"at-least-one-entity-id-is-required-for-delete-enti","errorCode":null,"errorMessage":"At least one entity ID is required for delete_entities.","messagePattern":"At least one entity ID is required for delete_entities\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"cli/python/src/mem0_cli/backend/platform.py","lineNumber":356,"sourceCode":"\n    def delete_entities(\n        self,\n        *,\n        user_id: str | None = None,\n        agent_id: str | None = None,\n        app_id: str | None = None,\n        run_id: str | None = None,\n    ) -> dict:\n        # v2 endpoint: DELETE /v2/entities/{entity_type}/{entity_id}/\n        type_map = {\n            \"user\": user_id,\n            \"agent\": agent_id,\n            \"app\": app_id,\n            \"run\": run_id,\n        }\n        entities = {t: v for t, v in type_map.items() if v}\n        if not entities:\n            raise ValueError(\"At least one entity ID is required for delete_entities.\")\n        # Delete each provided entity via the v2 path-based endpoint. Key each\n        # response by entity type so a multi-entity delete (e.g. --user-id and\n        # --agent-id together) doesn't discard everything but the last result.\n        results: dict = {}\n        for entity_type, entity_id in entities.items():\n            results[entity_type] = self._request(\n                \"DELETE\",\n                f\"/v2/entities/{_encode_path_segment(entity_type)}/{_encode_path_segment(entity_id)}/\",\n                params={\"source\": \"CLI\"},\n            )\n        return results\n\n    def ping(self, timeout: float | None = None) -> dict:\n        \"\"\"Call the ping endpoint and return the raw response.\n\n        When *timeout* is given it overrides the client-level timeout so that\n        validation pings can fail fast without blocking the user.\n        \"\"\"","sourceCodeStart":338,"sourceCodeEnd":374,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/cli/python/src/mem0_cli/backend/platform.py#L338-L374","documentation":"Error \"At least one entity ID is required for delete_entities.\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at cli/python/src/mem0_cli/backend/platform.py:356 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide at least one entity ID (user, agent, app, or run) to delete_entities."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}