@humanlikememory/human-like-mem
v1.0.3
Published
Long-term memory plugin for OpenClaw with automatic recall, storage, and agent-accessible memory tools.
Downloads
544
Maintainers
Readme
Human-Like Memory Plugin for OpenClaw
Long-term memory plugin for OpenClaw. Gives your agent the ability to remember past conversations, user preferences, and important context across sessions.
Features:
- Automatic memory recall before each response
- Automatic conversation storage after each response
- Procedural-memory context v2 writes with legacy v1 fallback
- Assistant tool calls and tool results can be stored as memory context blocks
- Agent-callable tools:
memory_searchandmemory_store - Registered as a first-class memory slot (
kind: "memory") - Reads configuration from OpenClaw plugin config only
- Platform metadata stripping is enabled by default for privacy
- Requires OpenClaw >= 2026.2.0
Quick Start
1. Install
openclaw plugins install @humanlikememory/human-like-mem2. Get Your API Key
Visit https://plugin.human-like.me to get your API key (starts with mp_).
3. Configure
# Set API key (required for memory sync)
openclaw config set plugins.entries.human-like-mem.config.apiKey "mp_your_key_here"
# Set as the active memory engine
openclaw config set plugins.slots.memory human-like-mem
# Enable memory search for the agent
openclaw config set agents.defaults.memorySearch '{"enabled":true}' --strict-json4. Restart
openclaw restart5. Verify
openclaw statusYou should see:
Memory │ 0 files · 0 chunks · sources remote-api · plugin human-like-mem · vector readyConfiguration Options
All options can be set via openclaw config set plugins.entries.human-like-mem.config.<key> <value>:
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| apiKey | string | unset | Your API key from https://plugin.human-like.me. The plugin can install without it, but memory sync stays disabled until configured. |
| baseUrl | string | https://plugin.human-like.me | API endpoint |
| userId | string | openclaw-user | User identifier |
| agentId | string | main | Agent identifier used to scope memory |
| scenario | string | openclaw-plugin | Scenario name used for both writes and searches |
| recallEnabled | boolean | true | Enable automatic memory recall |
| addEnabled | boolean | true | Enable automatic memory storage |
| recallGlobal | boolean | true | Search memories globally (not per-conversation) |
| memoryLimitNumber | number | 6 | Max memories to recall per turn |
| minScore | number | 0.1 | Minimum relevance score (0-1) |
| minTurnsToStore | number | 5 | Store after N conversation turns |
| sessionTimeoutMs | number | 300000 | Auto-flush timeout (ms) |
| stripPlatformMetadata | boolean | true | Don't send platform user IDs (Feishu/Discord) unless explicitly enabled |
| useV2Protocol | boolean | true | Use procedural-memory context v2 writes before falling back to legacy v1 message writes |
| captureToolCalls | boolean | true | Include assistant tool calls and tool results in procedural-memory context blocks |
| semanticEnabled | boolean | true | Enable semantic memory update and recall features |
| semanticRecallEnabled | boolean | true | Retrieve semantic memories into an in-process cache for prompt injection |
| semanticUpdateEnabled | boolean | true | Update semantic memory from the semantic conversation buffer |
| semTriggerTurns | number | 50 | Trigger semantic memory summarization after N cached semantic messages |
| semanticMemoryLimitNumber | number | 6 | Maximum number of semantic memories cached for prompt injection |
Example — full config:
openclaw config set plugins.entries.human-like-mem.config '{"apiKey":"mp_xxx","recallEnabled":true,"addEnabled":true,"memoryLimitNumber":8}' --strict-jsonExample — privacy-first config:
openclaw config set plugins.entries.human-like-mem.config.addEnabled false
openclaw config set plugins.entries.human-like-mem.config.stripPlatformMetadata trueImportant: Share Memory Across Multiple AI Agents
If you want multiple AI agents to read and write the same memory pool, you must align both agentId and scenario.
These two fields define the memory scope:
agentIdcontrols which agent the memory belongs toscenariocontrols which client or workflow namespace is used for writes and searches
The default OpenClaw-compatible values are:
openclaw config set plugins.entries.human-like-mem.config.agentId "main"
openclaw config set plugins.entries.human-like-mem.config.scenario "openclaw-plugin"If another client uses different values, set OpenClaw to match exactly. For example, if another agent writes memories under agentId=default and scenario=claude:
openclaw config set plugins.entries.human-like-mem.config.agentId "default"
openclaw config set plugins.entries.human-like-mem.config.scenario "claude"
openclaw restartIf these two fields do not match across clients, memory writes may succeed but cross-agent retrieval will not line up.
Agent Tools
Once installed, your agent can actively use memory:
memory_search— Search past conversations and stored knowledgememory_store— Save important information for future recall
These tools are automatically registered and available to the agent.
Slash Commands
/sem_remember— Manually trigger semantic memory summarization for the current session. The plugin consumes this command through OpenClaw's command system, updates semantic memory from the current semantic buffer, then clears that buffer to avoid duplicate summaries.
How It Works
- Before response (
before_prompt_build): The plugin searches for relevant memories based on the current prompt and injects them into context. - After response (
agent_end): The plugin caches the conversation turn. When the turn threshold is reached or the session times out, it flushes to long-term storage. - Semantic memory path: User and assistant messages are cached in a semantic buffer. When the buffer reaches
semTriggerTurns, or when/sem_rememberis used, the plugin updates semantic memory through the persona v2 upsert API. - Procedural memory path: When
useV2Protocolis enabled, the plugin writes conversation context to the v2 context API. IfcaptureToolCallsis enabled, assistant tool calls and tool results are included in the context blocks. - Compatibility fallback: If the v2 context write is unavailable, the plugin automatically falls back to the legacy v1 message API.
- On session end: Any remaining cached conversation is flushed.
Troubleshooting
- "API key not configured" — Run:
openclaw config set plugins.entries.human-like-mem.config.apiKey "mp_xxx" - "unavailable" in status — Make sure
plugins.slots.memoryis set tohuman-like-mem - Request timeouts — Increase
timeoutMsin config - Check logs:
openclaw logs | grep "Memory Plugin"Upgrade Notes
Version 1.0.0 ships the stable automatic-memory architecture introduced in v0.4.x:
- Plugin type is
memory - Automatic recall runs on
before_prompt_build - Automatic storage runs on
agent_endandsession_end - Procedural-memory context v2 writes are enabled by default, with automatic v1 fallback
- Tool call capture is enabled by default for richer memory context
- Agent tools
memory_searchandmemory_storeare registered by default
After updating, make sure the memory slot is set:
openclaw config set plugins.slots.memory human-like-mem
openclaw restartSecurity & Privacy
This plugin sends conversation data to a remote server. Before using in production:
- Read SECURITY.md — Details what data is transmitted
- Read PRIVACY.md — Data retention and deletion policies
Quick privacy tips:
- Use
addEnabled: falseto control what gets stored stripPlatformMetadataistrueby default; only set it tofalseif you explicitly want Feishu/Discord platform ID continuity- Use
<private>...</private>tags for content that shouldn't be memorized - Start with a test API key, not production
License
Apache-2.0
