π¦ ClawHub
MidOS Memory Cascade
by @msruruguay
Auto-escalating multi-tier memory search that cascades from in-memory cache through SQLite, grep, and LanceDB vector search to find the best answer with mini...
π‘ Examples
Python API
from tools.memory.memory_cascade import recall, storeSearch across all tiers
result = recall("adaptive alpha reranking")
β {"answer": {...}, "tier": "T5:lancedb", "latency_ms": 340, "confidence": 0.87}
Write to the right storage automatically
store("pattern", content="...", tags=["ml", "reranking"])
CLI
# Search
python memory_cascade.py recall "query here"View tier resolution stats
python memory_cascade.py statsRun self-evolution (learn shortcuts + tier skips)
python memory_cascade.py evolve
recall() Options
recall(
query: str,
min_confidence: float = 0.5, # stop escalating at this threshold
max_tier: int = 6 # 0=T0 only, 6=all tiers
)
Returns:
{
"answer": { "source": "...", "text": "..." },
"confidence": 0.87,
"latency_ms": 340.2,
"tiers_tried": 3,
"resolved_at": "T5:lancedb",
"shortcut": null,
"question_routed": false,
"escalation": [...]
}
TERMINAL
clawhub install midos-memory-cascade