Docs Use cases

Use cases across domains

Every use case has the same three parts — an event stream, an effect asked about later, and a ranked, explainable answer.

Every use case has the same three parts: an event stream, an effect asked about later, and a ranked, explainable answer drawn from recent history.

The lead use case is code changes and incidents. With AI coding tools, many more PRs reach production, and "what changed recently?" is no longer a short list. The library runs it today, and our GitHub connector (available on request) runs it end to end on a real repository.

AI agent memory runs on the same engine: of everything an agent has seen, which memories help with this turn? heapdb-memory runs it today, measured on LoCoMo.

Each worked example (setup, explanation, benchmarks) has its own page under Use cases.

We're designing HeapDB for more domains too: outbreak tracing, card fraud, recommendations, ride-sharing, hospitals, maintenance and security. Each design ships with a seeded, runnable example in our RFCs.

DomainEvents inQuestion askedTypical lag window
AI agent memoryMemories, with feedback on which were usedWhich memories help with this question?No lag; recency optional
Code changes / CI-CD (lead use case)Merged PRs with features (paths, migration, review speed, size, AI-authored), deploysWhich merged PR most likely broke main / caused this error spike? Which open PR needs a careful review?Minutes (CI) – hours (incidents)
Ops / SREDeploys, config changes, flag flipsWhy did p99 latency spike?Seconds – 1 h
Personal healthMeals, sleep, medication, exerciseWhy am I bloated / headachy?30 min – 8 h
Cloud costResource launches, scaling changesWhy did the bill jump?Hours – days
Personal financeTransactions, subscriptionsWhy is my balance low?Days – weeks
Security / support triageAlerts, tickets, customer tierWhat should I look at first?Decay, no lag
FraudTransactions, loginsWhich transaction caused this dispute?Days
IoT / homeAppliance runtimes, door and window sensorsWhy is the house cold?Minutes – hours

Two families

The uses fall into two families. Attribution uses ("why did E happen?") need a lag kernel and link learning. Priority uses ("what next?") need only decay and weight, or, for code changes, learned links without a kernel (pre-merge risk of an open PR), and reduce to the forward-decay heap described in Core algorithms.

Have a use case that isn't listed? Post it on the use case board.