{"record":{"id":"7076218695325af2","repo":"mem0ai/mem0","slug":"entity-management-is-only-available-in-platform-mo","errorCode":null,"errorMessage":"Entity management is only available in platform mode.","messagePattern":"Entity management is only available in platform mode\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"integrations/openclaw/providers.ts","lineNumber":626,"sourceCode":"        );\n      }\n      return { id: memoryId, updated: true };\n    },\n\n    async delete(memoryId, opts = {}) {\n      if (opts.all) {\n        await provider.deleteAll(opts.userId ?? userId);\n        return { deleted: \"all\" };\n      }\n      if (memoryId) {\n        await provider.delete(memoryId);\n        return { deleted: memoryId };\n      }\n      throw new Error(\"Either memoryId or all is required\");\n    },\n\n    async deleteEntities() {\n      throw new Error(\"Entity management is only available in platform mode.\");\n    },\n    async status() {\n      return { connected: true, backend: \"oss\" };\n    },\n    async entities() {\n      throw new Error(\"Entity management is only available in platform mode.\");\n    },\n    async listEvents() {\n      throw new Error(\"Event management is only available in platform mode.\");\n    },\n    async getEvent() {\n      throw new Error(\"Event management is only available in platform mode.\");\n    },\n  };\n}\n","sourceCodeStart":608,"sourceCodeEnd":642,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/integrations/openclaw/providers.ts#L608-L642","documentation":"Thrown by the OSS provider's deleteEntities() because entity management (per-entity delete via /v2/entities/) is a platform-API feature with no local equivalent. In open-source mode memories live in a local vector store without the platform's entity model, so the method deliberately throws instead of silently doing nothing.","triggerScenarios":"Config mode is 'open-source' (or auto-detected as OSS because no apiKey is set) and code calls provider.deleteEntities(). Typically shared agent code that works in platform mode and is run against an OSS deployment.","commonSituations":"Switching a working setup from platform to open-source mode without gating entity calls; forgetting that deleteEntities/entities/listEvents/getEvent are platform-only surfaces.","solutions":["Gate entity calls on mode: use provider.status() or config.mode and only call deleteEntities() in platform mode.","In OSS mode, achieve the equivalent by filtering deletes with the userId used at add time (delete(undefined, { all: true }) after provider.deleteAll(userId)).","If entity management is required, switch back to platform mode with a valid apiKey."],"exampleFix":"// before\nawait provider.deleteEntities({ userId }); // throws in OSS mode\n\n// after\nif ((await provider.status()).backend === 'platform') {\n  await provider.deleteEntities({ userId });\n} else {\n  await provider.delete(undefined, { all: true, userId });\n}","handlingStrategy":"try-catch","validationCode":"const { backend } = await provider.status();\nif (backend !== 'platform') {\n  // skip entity management; OSS has no entity registry\n}","typeGuard":null,"tryCatchPattern":"try {\n  await provider.deleteEntities(ids);\n} catch (err) {\n  if ((err as Error).message.includes('platform mode')) {\n    await provider.delete(undefined, { all: true, userId: ids.userId }); // OSS fallback\n  } else throw err;\n}","preventionTips":["Branch entity/event calls on provider.status().backend.","Document which tool surface is platform-only when writing mode-agnostic skills."],"tags":["oss-mode","entities","mode-mismatch","typescript"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}