mem0ai/mem0 · error · Error
Entity management is only available in platform mode.
Error message
Entity management is only available in platform mode.
What it means
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.
Source
Thrown at integrations/openclaw/providers.ts:626
);
}
return { id: memoryId, updated: true };
},
async delete(memoryId, opts = {}) {
if (opts.all) {
await provider.deleteAll(opts.userId ?? userId);
return { deleted: "all" };
}
if (memoryId) {
await provider.delete(memoryId);
return { deleted: memoryId };
}
throw new Error("Either memoryId or all is required");
},
async deleteEntities() {
throw new Error("Entity management is only available in platform mode.");
},
async status() {
return { connected: true, backend: "oss" };
},
async entities() {
throw new Error("Entity management is only available in platform mode.");
},
async listEvents() {
throw new Error("Event management is only available in platform mode.");
},
async getEvent() {
throw new Error("Event management is only available in platform mode.");
},
};
}
View on GitHub (pinned to 001c235229)
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.
Example fix
// before
await provider.deleteEntities({ userId }); // throws in OSS mode
// after
if ((await provider.status()).backend === 'platform') {
await provider.deleteEntities({ userId });
} else {
await provider.delete(undefined, { all: true, userId });
} Defensive patterns
Strategy: try-catch
Validate before calling
const { backend } = await provider.status();
if (backend !== 'platform') {
// skip entity management; OSS has no entity registry
} Try / catch
try {
await provider.deleteEntities(ids);
} catch (err) {
if ((err as Error).message.includes('platform mode')) {
await provider.delete(undefined, { all: true, userId: ids.userId }); // OSS fallback
} else throw err;
} Prevention
- Branch entity/event calls on provider.status().backend.
- Document which tool surface is platform-only when writing mode-agnostic skills.
When it happens
Trigger: 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.
Common situations: Switching a working setup from platform to open-source mode without gating entity calls; forgetting that deleteEntities/entities/listEvents/getEvent are platform-only surfaces.
Related errors
- Event management is only available in platform mode.
- At least one entity ID is required for deleteEntities.
- Unknown LLM provider: ${providerId}
- Unknown embedder provider: ${providerId}
- Either memoryId or all is required
AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15).
Data as JSON: /api/errors/7076218695325af2.
Report an issue: GitHub.