π¦ ClawHub
Openclaw Token Memory Optimizer
by @klautimus
Optimization suite for OpenClaw agents to prevent token leaks and context bloat. Use when an agent needs to implement background task isolation (Cron) or a Reset & Summarize workflow (RAG).
π‘ Examples
Use memory_search to retrieve context from your logs instead of loading everything:
memory_search(query="what did we decide about the API design")
The tool returns relevant snippets with file paths and line numbers. Use memory_get to pull specific sections.
βοΈ Configuration
Add transcript paths to memorySearch.extraPaths:
{
"memorySearch": {
"extraPaths": [
"~/.openclaw/sessions/*.jsonl"
]
}
}
Best Practices
π Tips & Best Practices
TERMINAL
clawhub install openclaw-token-memory-optimizer