Memory Router
OpenClaw skill that auto-tiers bloated MEMORY.md, generates smart per-session manifests, and routes only what matters — 70-85% context reduction with zero de... Skill: Memory Router Owner: jlacroix82 Summary: OpenClaw skill that auto-tiers bloated MEMORY.md, generates smart per-session manifests, and routes only what matters — 70-85% context reduction with zero de... Tags: latest:2.4.3 Version history: v2.4.3 | 2026-07-21T18:51:29.200Z | auto **2.4.3 Changelog** - Added prominent safety and warning sections to SKILL.md: clarifies destructive operations, confirmation flags, a
Rank
62
Safety
84
Downloads
2.3k
Updated
Oct 9, 2026
Version
2.4.3
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 2.3K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 2.3K downloadsadoption · observed Oct 9, 2026
- Latest release
- 2.4.3release · observed Jul 21, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s175p518b8g47fx6r9zyvs95ks876t4t:memory-router- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-jlacroix82-memory-router/snapshot"
Documentation
CLAWHUB
145,759 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
# MemoryRouter ⚡ **Never lose context. Never forget decisions. Never repeat mistakes.** The memory problem is the single biggest reason agents feel dumb over time. Not the models. Not the prompts. **Memory management.** MemoryRouter fixes it with one tool, zero dependencies, zero setup. ## The Problem — In 30 Seconds Agent memory files grow unbounded. After a week, you've got thousands of lines across dozens of files. Every session loads **everything** — even when the user asks "what's the weather?" That's tokens burned on irrelevant memories, every interaction, forever. Then compaction kicks in and details vanish. **The bottleneck isn't the model. It's what the model gets to see.** ## Why Memory Fails | Failure Mode | Cause | Fix | |-------------|-------|-----| | Forgets everything | Loads irrelevant files, context window fills up | Smart manifest — load only what matters | | Repeats mistakes | Lessons not captured or loaded | Entity index + audit for conflicts | | Repeats work | No session state persistence | WAL protocol — write state before responding | | Slow responses | Loads 50+ files when only 3 matter | Token budgeting — cap context window | | Duplicates everywhere | No automated cleanup | `--audit` finds high-similarity pairs | ## The Architecture ``` ┌──────────────────────────────────────────────────────┐ │ MEMORYROUTER ⚡ │ ├──────────────────────────────────────────────────────┤ │ │ │ ┌──────────────┐ ┌──────────────┐ │ │ │ AUTO-TIER │ │ MANIFEST │ │ │ │ MEMORY.md │ → │ GENERATOR │ │ │ │ │ │ │ │ │ │ Core (always │ │ Required: │ │ │ │ loaded) │ │ MEMORY.md │ │ │ │ + Archive │ │ Recent logs │ │ │ │ (on demand) │ │ Boosted: │ │ │ └──────────────┘ │ entity files │ │ │ └──────┬───────┘ │ │ │ │ │ ┌──────────────▼──────────────┐ │ │ │ ENTITY RESOLUTION │ │ │ │ "alice" → preferences.md, │ │ │ │ notes.md, decisions.md│ │ │ └──────────────┬──────────────┘ │ │ │ │ │ ┌──────────────▼──────────────┐ │ │ │ TOKEN BUDGET FILTER │ │ │ │ 20K budget → 7 files │ │ │ │ 100K budget → 16 files │ │ │ └──────────────┬──────────────┘ │ │ │ │ │ ┌──────────────▼──────────────┐ │ │ │ AGENT LOADS ONLY WHAT │ │ │ │ MATTERS → 70-85% REDUCTION │ │ │
README.md
# MemoryRouter ⚡ **Never lose context. Never forget decisions. Never repeat mistakes.** The memory problem is the single biggest reason agents feel dumb over time. Not the models. Not the prompts. **Memory management.** MemoryRouter fixes it with one tool, zero dependencies, zero setup. ## The Problem — In 30 Seconds Agent memory files grow unbounded. After a week, you've got thousands of lines across dozens of files. Every session loads **everything** — even when the user asks "what's the weather?" That's tokens burned on irrelevant memories, every interaction, forever. Then compaction kicks in and details vanish. **The bottleneck isn't the model. It's what the model gets to see.** ## Why Memory Fails | Failure Mode | Cause | Fix | |-------------|-------|-----| | Forgets everything | Loads irrelevant files, context window fills up | Smart manifest — load only what matters | | Repeats mistakes | Lessons not captured or loaded | Entity index + audit for conflicts | | Repeats work | No session state persistence | WAL protocol — write state before responding | | Slow responses | Loads 50+ files when only 3 matter | Token budgeting — cap context window | | Duplicates everywhere | No automated cleanup | `--audit` finds high-similarity pairs | ## The Architecture ``` ┌──────────────────────────────────────────────────────┐ │ MEMORYROUTER ⚡ │ ├──────────────────────────────────────────────────────┤ │ │ │ ┌──────────────┐ ┌──────────────┐ │ │ │ AUTO-TIER │ │ MANIFEST │ │ │ │ MEMORY.md │ → │ GENERATOR │ │ │ │ │ │ │ │ │ │ Core (always │ │ Required: │ │ │ │ loaded) │ │ MEMORY.md │ │ │ │ + Archive │ │ Recent logs │ │ │ │ (on demand) │ │ Boosted: │ │ │ └──────────────┘ │ entity files │ │ │ └──────┬───────┘ │ │ │ │ │ ┌──────────────▼──────────────┐ │ │ │ ENTITY RESOLUTION │ │ │ │ "alice" → preferences.md, │ │ │ │ notes.md, decisions.md│ │ │ └──────────────┬──────────────┘ │ │ │ │ │ ┌──────────────▼──────────────┐ │ │ │ TOKEN BUDGET FILTER │ │ │ │ 20K budget → 7 files │ │ │ │ 100K budget → 16 files │ │ │ └──────────────┬──────────────┘ │ │ │ │ │ ┌──────────────▼──────────────┐ │ │ │ AGENT LOADS ONLY WHAT │ │ │ │ MATTERS → 70-85% REDUCTION │ │ │
_meta.json
{
"ownerId": "kn7b6eyf5vc7khg5fr63pjm8xd82qvw5",
"slug": "memory-router",
"version": "2.4.3",
"publishedAt": 1784659889200
}INSTALL.md
# MemoryRouter — Installation Guide
## Prerequisites
- OpenClaw installed and running
- Node.js 18+ (built-in `fs` and `path` — no npm packages needed)
- A `MEMORY.md` file in your workspace (can be empty initially)
## Quick Install (1 minute)
```bash
# 1. Create the skill directory
mkdir -p ~/.openclaw/workspace/skills/memory-router
# 2. Copy the skill files
# Place these files from this package into the directory above:
# - memory-router.js (core engine)
# - config.json (thresholds and options)
# - SKILL.md (skill definition)
# - README.md (this guide)
# 3. Make executable
chmod +x ~/.openclaw/workspace/skills/memory-router/memory-router.js
# 4. Test it works
node ~/.openclaw/workspace/skills/memory-router/memory-router.js --status
```
Expected output:
```
=== MemoryRouter Status ===
MEMORY.md: X lines, Y KB ✅ OK
memory/: 0 files, 0.0 KB total
self-improving/: 0 files
proactivity/: 0 files
archives: 0 files
manifest: not generated
entity index: 0 entities
WAL: not initialized
```
## Configuration
Edit `config.json` to customize behavior:
```json
{
"thresholds": {
"memoryMdMaxLines": 500,
"memoryMdMaxChars": 25000,
"tierArchiveMinAgeDays": 3,
"auditMaxFiles": 50
},
"tiering": {
"archiveDir": "memory/active",
"retentionDays": 90,
"keepInMemory": [
"identity", "preferences", "relationships",
"projects", "patterns", "boundaries", "key_facts"
]
},
"manifest": {
"generateOnTier": true,
"manifestPath": "memory/memory-manifest.json"
},
"audit": {
"reportPath": "memory/memory-audit-report.md",
"duplicateThreshold": 0.7,
"conflictKeywords": [
"revised", "updated", "changed", "no longer",
"actually", "correction", "mistake"
]
}
}
```
### Key settings explained
| Setting | Default | What it does |
|---------|---------|-------------|
| `memoryMdMaxLines` | 500 | Auto-tier triggers when MEMORY.md exceeds this line count |
| `memoryMdMaxChars` | 25000 | Same, but by character count (whichever threshold is hit first) |
| `tierArchiveMinAgeDays` | 3 | Sections must be this old before archiving |
| `retentionDays` | 90 | ⚠️ Archived files older than this are **candidates for deletion**. Irreversible. Set to 365+ until confident. |
| `keepInMemory` | see above | Headers/keywords that always stay in the core MEMORY.md |
| `generateOnTier` | true | Auto-generate manifest after tiering |
| `duplicateThreshold` | 0.7 | Similarity score (>70%) to flag as potential duplicate |
## Heartbeat Integration
Add this to your `HEARTBEAT.md` under scheduled tasks:
```markdown
### 🔧 MemoryRouter (SAFE commands only)
- Run `node skills/memory-router/memory-router.js --compact` to update manifest ✅ safe
- Run `node skills/memory-router/memory-router.js --audit` to check for issues ✅ safe
- Run `node skills/memory-router/memory-router.js --status` for health overview ✅ safe
- ⚠️ Do NOT auto-run `--tier` during heartbeats — it pskill-card.md
## Description: Memory Router helps agents manage local memory files by generating focused manifests, tiering oversized MEMORY.md content, auditing duplicate or conflicting entries, and maintaining entity and session-state indexes. This skill is ready for commercial/non-commercial use. ## Publisher: [jlacroix82](https://clawhub.ai/user/jlacroix82) ### License/Terms of Use: MIT-0 ## Use Case: Developers and agent operators use Memory Router to reduce memory context bloat, route only relevant memory files into a session, and inspect local memory health before loading or rewriting memory state. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Tiering, restore, cleanup, entity, and WAL commands can modify or overwrite local memory files. Mitigation: Use a backed-up workspace, run status or dry-run commands first, and reserve --tier --confirm and --restore --force for reviewed manual execution. Risk: Custom workspace or path settings can increase the chance of operating on the wrong files. Mitigation: Avoid absolute paths or .. components in custom path settings and confirm the workspace before running commands that write files. Risk: The security verdict is suspicious because destructive restore and tiering guarantees may be weaker than the documentation suggests. Mitigation: Treat the skill as an assisted local memory tool, review generated manifests and audit reports, and do not rely on its backups as the only recovery mechanism. ## Reference(s): - [ClawHub skill page](https://clawhub.ai/jlacroix82/skills/memory-router) - [README](artifact/README.md) - [Installation Guide](artifact/INSTALL.md) - [Skill definition](artifact/SKILL.md) ## Skill Output: **Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] **Output Format:** [Markdown guidance with shell commands, JSON configuration examples, generated JSON manifests, text status output, and Markdown audit reports] **Output Parameters:** [1D] **Other Properties Related to Output:** [Local filesystem outputs may include memory/memory-manifest.json, memory/memory-audit-report.md, archive files, backups, entity indexes, and SESSION-STATE.md depending on the command.] ## Skill Version(s): 2.4.3 (source: server release evidence) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/jlacroix82/skills/memory-router",
"sourceUrl": "https://clawhub.ai/jlacroix82/skills/memory-router",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T16:44:14.157Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-jlacroix82-memory-router/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-jlacroix82-memory-router/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T16:44:14.157Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "2.3K downloads",
"href": "https://clawhub.ai/jlacroix82/memory-router",
"sourceUrl": "https://clawhub.ai/jlacroix82/memory-router",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T16:44:14.157Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.4.3",
"href": "https://clawhub.ai/jlacroix82/memory-router",
"sourceUrl": "https://clawhub.ai/jlacroix82/memory-router",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-21T18:51:29.200Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-jlacroix82-memory-router/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-jlacroix82-memory-router/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.4.3",
"description": "**2.4.3 Changelog** - Added prominent safety and warning sections to SKILL.md: clarifies destructive operations, confirmation flags, and filesystem requirements. - Improved SKILL.md documentation for commands that modify or delete files, including `--tier`, `--restore`, and `--cleanup`. - Removed the outdated skill-card.md file.",
"href": "https://clawhub.ai/jlacroix82/memory-router",
"sourceUrl": "https://clawhub.ai/jlacroix82/memory-router",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-21T18:51:29.200Z",
"isPublic": true
}
]
}Record generated Oct 9, 2026.
