|
|
преди 1 месец | |
|---|---|---|
| PROJECT.md | преди 1 месец | |
| README.md | преди 1 месец | |
| index.ts | преди 1 месец | |
| openclaw.plugin.json | преди 1 месец | |
| package.json | преди 1 месец |
Logs recent chat turns to /tmp/openclaw-chat.log so the mem0 auto-capture hook can attach the previous assistant reply when storing conversational memories.
session_start, message_received, and agent_end eventssessionKey and caches it/tmp/openclaw-chat.logThe mem0 hook reads the log to retrieve the last assistant reply and include it in the capture payload. This avoids losing context when auto-capturing a new user message.
Each log line is a JSON object:
{
"ts": "2026-03-16T02:30:46.827Z",
"sessionKey": "agent:main:main",
"messages": [
{ "role": "user", "content": "..." },
{ "role": "assistant", "content": "..." }
]
}
1) Edit in workspace/chat-logger-plugin/
2) Restart gateway so the plugin is reloaded
workspace/hooks/mem0-auto-capture/hook/handler.ts