@m3mory/lossless-m3mory-claw
v0.1.0
Published
Lossless m3mory Claw — DAG-based context management with m3mory long-term memory integration for OpenClaw
Downloads
131
Maintainers
Readme
lossless-m3mory-claw
Lossless m3mory Claw — A fork of Lossless Claw that integrates m3mory long-term memory into the Lossless Claw context-engine assembly path.
This is the plugin rebuild workstream for the Lossless m3mory Claw runtime. It is not the m3mory commercial dashboard or API service.
What this is
This plugin combines:
- Lossless Claw — DAG-based context management, incremental compaction, and token-budget assembly (upstream base, MIT licensed)
- m3mory — Long-term memory retrieval and verified storage, injected as a dynamic context item inside the Lossless Claw assembly path
The result is a context-engine plugin where:
- m3mory context appears in the assembled prompt as a dynamic, budgeted context item — not as fake conversation history
- Compaction runs through the lossless path first, not native lossy fallback
- Compacted material is not released until transfer to m3mory is verified, or a fallback path is explicitly recorded and logged
- Chatbot, general agent, and coding agent runs receive different context shapes without polluting transcript history
What it does differently from the hook-only plugin
The previous @m3mory/m3moryclaw-plugin used pre-turn and post-turn hooks for recall and capture. That approach worked for basic memory injection but had four gaps:
- It did not register as a context engine — Lossless Claw owned assembly, the plugin was a side passenger
- It did not own compaction — native lossy compaction could still fire as a fallback
- It did not participate in the lossless overflow path
- It did not verify transfer before releasing compacted material
This fork fixes all four gaps by extending the Lossless Claw engine base rather than wrapping it from the outside.
Architecture overview
OpenClaw runtime
└── lossless-m3mory-claw (context-engine)
├── Assembly (per turn)
│ ├── Summaries (DAG, from upstream LCM)
│ ├── Fresh raw turns (protected tail)
│ └── m3mory block (dynamic, budgeted)
│ ├── Retrieved from m3mory API
│ ├── Shaped by agent type (chatbot / general / coding)
│ └── Omitted or shrunk under token pressure
├── Ingest / capture (write path)
│ ├── Strip injected m3mory blocks before capture
│ ├── Apply noise filters
│ └── Send durable turns to m3mory API
├── Compaction (lossless path first)
│ ├── Transfer to m3mory before release
│ ├── Verify transfer receipt
│ └── Log fallback explicitly if verification fails
└── Diagnostics (/lcm)
├── All upstream LCM diagnostics preserved
└── m3mory retrieval, transfer, and fallback state addedStatus
v0.1.0 — all sprints complete
- WP0: Fork foundation and identity
- WP1: m3mory client and config layer
- WP2: Unified identity model
- WP3: Dynamic retrieval in assembly
- WP4: Agent-type retrieval policy
- WP5: Capture on the lossless lifecycle
- WP6: Verified transfer ledger
- WP7: Continuity index and overflow path
- WP8: Extended
/lcmdiagnostics - WP9: Manual tools and setup flows
- WP10: Tests and docs
- WP11: User and operator guide
Installation
Install with OpenClaw's plugin installer:
openclaw plugins install @m3mory/lossless-m3mory-clawFor local development, link a working copy:
openclaw plugins install --link /path/to/lossless-m3mory-clawQuick start
- Install the plugin (see above)
- Set your m3mory credentials as environment variables:
M3MORY_API_KEY=your-api-key
M3MORY_AGENT_ID=your-agent-uuid
M3MORY_USER_ID=your-stable-user-id- Or configure via
openclaw.json:
{
"plugins": {
"entries": {
"lossless-m3mory-claw": {
"config": {
"m3mory": {
"apiKey": "${M3MORY_API_KEY}",
"agentId": "${M3MORY_AGENT_ID}",
"userId": "${M3MORY_USER_ID}"
}
}
}
}
}
}- Restart OpenClaw. Retrieved memories appear in the assembled context automatically. Use
/lcm statusto inspect the runtime state.
How it works
See docs/how-lossless-m3mory-claw-works.md for a complete explanation of the architecture, retrieval model, capture behaviour, and what to expect at runtime.
Configuration
See docs/configuration.md for all configuration options including m3mory-specific settings (apiKey, agentId, userId, agentType, autoRecall, autoCapture, etc.).
Upstream attribution
This package is a fork of Lossless Claw by Josh Lehman / Martian Engineering, used under the MIT License.
The upstream context-engine architecture, DAG summarization, SQLite conversation store, assembly and compaction machinery, and /lcm diagnostics are derived from the Lossless Claw codebase. New work — m3mory API integration, dynamic context injection, verified transfer, identity model, agent-type policy, and diagnostics extensions — is Copyright (c) 2026 m3mory Inc.
See LICENSE for the full licence text and upstream attribution.
Licence
New fork work: Business Source License 1.1 (converts to MIT on 2030-04-20). Upstream Lossless Claw base: MIT. See LICENSE for details.
