Mem0 OpenClaw Plugin (v1.0.4)
Added
- Interactive init flow:
openclaw mem0 initwith interactive menu (email verification or direct API key). Non-interactive modes:--api-key,--email,--email --code memory_addtool: Replacesmemory_store— name now matchesmem0CLI and platform APImemory_deletetool: Unified delete — single ID, search-then-delete, bulk, entity cascade. Replacesmemory_forgetandmemory_delete_all- CLI subcommands:
openclaw mem0 init,openclaw mem0 status(renamed fromstats),openclaw mem0 config show,openclaw mem0 config set importCLI command: Bulk-import memories from a JSON file with--user-idand--agent-idoverridesevent list/event statusCLI commands: Monitor background processing eventsfs-safe.tsmodule: Isolated filesystem wrappers (sync read/write/exists/mkdir/unlink) in a separate entry point — keeps file I/O out of the main bundlebackend/module:PlatformBackendwith direct HTTP API access for CLI commandscli/config-file.ts: Persistent plugin auth storage in~/.openclaw/openclaw.json- Plugin manifest: Added
contracts.tools,configSchema, anduiHintstoopenclaw.plugin.json - Test suite: 329 tests across 10 test files covering tools, CLI, config, dream gate, providers, and skill-loader
Changed
- Modular architecture: Extracted tools into
tools/directory (6 files) and CLI intocli/commands.ts—index.tsdown from ~1700 to ~890 lines - Code splitting: tsup builds with
splitting: trueand two entry points (index.ts,fs-safe.ts), separating filesystem I/O from the main bundle - Skills updated: All SKILL.md files reference new tool names (
memory_add,memory_delete) matching the plugin manifest - WRITE_TOOLS updated: Dream gate tracks
memory_deleteandmemory_addinstead ofmemory_forgetandmemory_store mem0aidependency: Updated from2.3.0to2.4.5- Auto-recall timeout: Recall wrapped in 8-second
Promise.race— if the LLM takes too long, recall is skipped instead of stalling the gateway - Auto-capture fire-and-forget:
provider.add()now runs in the background via.then()/.catch()— theagent_endhook returns immediately, zero event loop blocking - Auto-capture minimum content gate: Skips extraction when total user content is <50 chars after filtering — trivial conversations ("ok", "thanks") no longer trigger LLM calls
- CLI search: Lowered threshold to 0.3 so explicit searches are more permissive than auto-recall
- Init defaults: Choice defaults to
1(email login) on Enter, User ID defaults to OS username — no more empty values - Init no longer stores
baseUrl: Useshttps://api.mem0.aidirectly instead of persisting it to config - Help output reordered:
openclaw mem0 helpnow shows high-value commands first (search, add) instead of alphabetical
Removed
memory_storetool — replaced bymemory_addmemory_forgettool — replaced bymemory_deletememory_delete_alltool — merged intomemory_deletememory_historytool andhistoryCLI command — deprecatedcustom_instructions/custom_categoriesinbuildAddOptions: No longer injected into every auto-capture API call. Config fields (customInstructions,customCategories) remain as user-configurable options.