TTemporalStore.AI GitHub

Data model

Aggregated Feature: filtered rollups over time windows.

Compute sum, min, max, count, and grouped rollups per entity, filtered by dimension, over sliding or tumbling windows — served directly instead of rebuilt by a stream job for every new feature.

What it is

The math over a window, computed inside the store.

An Aggregated Feature turns an entity's raw events into a number — or a small set of grouped numbers — over a time window, without you shipping the events anywhere. Ask for sum, min, max, count, or rate over the last 15 minutes or 7 days, optionally filtered by dimension and grouped by another.

Each entity keeps its own sparse aggregate state, so the model scales to millions of keys without a stream job per feature. Results are fresh at request time: they reflect the latest event, not the next batch cycle.

That freshness plus request-time filtering is the edge over a nightly pipeline or a pre-computed cube — new features are a read, not a new job.

Events for one entity
checkout_eventsamount, country, method …
↓ window + filter + group, in the engine ↓
One bounded read returns
countlast 15m
sum(amount)by channel

In practice

Read a window; filter and group in the same call.

A feature window — count and sum over 15 minutes
f = ts.window(
  table="checkout_events",
  entity="user_42",
  range="15m",
  metrics=["count", "sum(amount_usd)"],
)
Filtered and grouped rollup — chargebacks by channel over 7 days
f = ts.window(
  table="chargebacks",
  entity="merchant_3",
  range="7d",
  group_by=["channel"],
  metrics=["count", "sum(amount)"],
)

When to use it

When a decision needs a fresh number over recent events.

Reach for an Aggregated Feature when you would otherwise stand up a stream job or query a warehouse just to get one windowed statistic per entity at request time.

Use caseAggregateWhy it fits
Risk & fraud featurescount / sum over minutes, filtered by dimensionFresh signal at scoring time across millions of accounts.
Campaign spend windowssum(amount) grouped by channel over a dayEnforces budgets and pacing without a spend pipeline.
Recommendation freshnesscount / rate over the recent windowReflects the latest interactions, not last night's batch.
Operational healthrate / max over a rolling windowPer-entity metrics served straight from the store.

Related models

Aggregates pair with sequences and control state.

SequencesLong Sequence FeatureRaw ordered events behind the rollups. Counters & setsControl StateCaps and distinct sets for safety. FlagshipContext ManagementAgent memory and evidence.