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.
| Domain | Events in | Question asked | Typical lag window |
|---|---|---|---|
| AI agent memory | Memories, with feedback on which were used | Which 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), deploys | Which merged PR most likely broke main / caused this error spike? Which open PR needs a careful review? | Minutes (CI) – hours (incidents) |
| Ops / SRE | Deploys, config changes, flag flips | Why did p99 latency spike? | Seconds – 1 h |
| Personal health | Meals, sleep, medication, exercise | Why am I bloated / headachy? | 30 min – 8 h |
| Cloud cost | Resource launches, scaling changes | Why did the bill jump? | Hours – days |
| Personal finance | Transactions, subscriptions | Why is my balance low? | Days – weeks |
| Security / support triage | Alerts, tickets, customer tier | What should I look at first? | Decay, no lag |
| Fraud | Transactions, logins | Which transaction caused this dispute? | Days |
| IoT / home | Appliance runtimes, door and window sensors | Why 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.