{"record":{"id":"0492476cd234d1f7","repo":"mem0ai/mem0","slug":"either-memory-id-or-all-is-required","errorCode":null,"errorMessage":"Either memory_id or --all is required","messagePattern":"Either memory_id or --all is required","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"cli/python/src/mem0_cli/backend/platform.py","lineNumber":337,"sourceCode":"                params[\"user_id\"] = user_id\n            if agent_id:\n                params[\"agent_id\"] = agent_id\n            if app_id:\n                params[\"app_id\"] = app_id\n            if run_id:\n                params[\"run_id\"] = run_id\n            return self._request(\"DELETE\", \"/v1/memories/\", params=params)\n        elif memory_id:\n            params = {\"source\": \"CLI\"}\n            if delete_linked:\n                params[\"delete_linked\"] = \"true\"\n            return self._request(\n                \"DELETE\",\n                f\"/v1/memories/{_encode_path_segment(memory_id)}/\",\n                params=params,\n            )\n        else:\n            raise ValueError(\"Either memory_id or --all is required\")\n\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:","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/cli/python/src/mem0_cli/backend/platform.py#L319-L355","documentation":"Error \"Either memory_id or --all is required\" thrown in mem0ai/mem0.","triggerScenarios":"Thrown at cli/python/src/mem0_cli/backend/platform.py:337 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a specific memory_id to the command, or add --all to target every memory."],"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-15T17:31:12.345Z"}