🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ 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...

Versionv1.0.0
Installs2
πŸ’‘ Examples

Python API

from tools.memory.memory_cascade import recall, store

Search 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 stats

Run 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": [...]
}

View on ClawHub
TERMINAL
clawhub install midos-memory-cascade

πŸ§ͺ Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

πŸ” Can't find the right skill?

Search 60,000+ AI agent skills β€” free, no login needed.

Search Skills β†’