Skip to main content

Memory Operations and Credits

GrayMatter operational view

GrayMatter operational discipline is simple: quality first, then spend.

Core signals

  • Context utilization (usedPct)
  • Waste (wastePct)
  • Memory hit rate (hitRate)
  • Cost metrics (burnRate, retrieval/write/assembly cost)

Action ladder

  1. Compact when waste rises and hit rate is flat.
  2. Reindex when retrieval quality declines despite healthy context headroom.
  3. Prune when stale memory dominates active relevance.
  4. Expand only when productive context demand is sustained.

Economic control

  • Track ledger balance on /credits/:accountId?.
  • Use /buy-credits before high-throughput operations.
  • Keep external integrations idempotent for payment/usage writes.