Use cases
Pick the model that fits your workload.
Context Management is the flagship. Long Sequence Feature, Aggregated Feature, and Control State are the temporal primitives behind ranking, risk, ads, and agent-safety workloads — all served by one store.
How to choose
Start from the question you ask at read time.
Every workload keys state by an entity — a session, a user, a device, a card — and asks one temporal question online. The shape of that question tells you the model.
Four questions cover almost everything teams build on temporal state:
- “What has this agent seen, and what belongs in the prompt now?” → Context Management. Replayable memory: messages, tool traces, retrieval evidence, and summaries assembled into a compact ContextPack.
- “What is the recent ordered history for this entity?” → Long Sequence Feature. Tail reads and windowed slices over a long behavior sequence, for rankers and investigation tools.
- “What is the sum / min / max / count over a time window?” → Aggregated Feature. Filtered, grouped rollups for risk and recsys features.
- “How many, or how many distinct, in the last N minutes?” → Control State. Counters and distinct sets for frequency caps, velocity, and fraud.
One store answers all four, so an entity's context and its safety counters live on the same read path instead of four separate systems.
Pick by the question, not the storage. All four resolve on one temporal read path.
Flagship: Context Management
Agent memory needs temporal storage, not a loose prompt buffer.
A coding or research agent generates a stream of events: user goals, messages, file edits, tool calls, approvals, failures, and generated artifacts. A flat prompt buffer forgets most of it and cannot explain what it knew when. Context Management stores every event as a time-indexed record keyed by session_id, so the agent can resume with evidence and you can replay exactly what context was available at any decision.
At read time you do not dump the whole history into the prompt. You ask the store to build a ContextPack: it filters by scope and time, ranks source-backed memories and summaries, and returns a compact, budget-bounded slice — the tool traces, preference deltas, and retrieval evidence that matter right now.
Building agent context at read time
pack = store.build_context(
session_id="sess-4817",
now=turn_started_at,
budget_tokens=2048, # bound what enters the prompt
include=["messages", "tool_traces", "summaries", "preferences"],
window="24h", # recent events, plus pinned summaries
)
for item in pack.items:
print(item.kind, item.ts, item.source) # replayable, source-backed
prompt = render_system_context(pack) # drop straight into the prompt
Worked examples
One store, many temporal questions.
The same engine, keyed differently, answers agent, ranking, risk, ads, and fraud questions online.
| Use case | Entity key | Model | Online question |
|---|---|---|---|
| Agent context | session_id | Context Management | What tool calls, summaries, and preference deltas should be in the prompt now? |
| Recommendation ranking | user_id | Long Sequence Feature | What recent product, search, or content sequence should the ranker see? |
| Failed-login risk | device_id | Aggregated Feature | How many failed logins by country and method in the last 30 minutes? |
| Ads frequency cap | campaign_id + user_id | Control State (counter) | How many impressions in the last hour, day, or campaign window? |
| Fraud velocity | user_id | Control State (counter) | How many purchases happened in the last 5 minutes? |
| Card-testing detection | card_id | Control State (distinct) | How many unique merchants did this card touch in the last 24 hours? |
Context management landscape
How TemporalStore compares to other memory systems.
Several projects tackle agent memory. In their own papers and pages, OpenViking / VikingMem report beating the other systems on standard memory benchmarks — so we benchmark head-to-head against OpenViking as the bar to clear.
| System | Approach | Temporal & replay | One service | Retrieval |
|---|---|---|---|---|
| TemporalStore | Append-structured temporal store; Context model | Native event-time + replay | Yes — memory, retrieval, counters, replay in one engine | Filter-first temporal; optional vector recall |
| OpenViking / VikingMem | Event/entity memory, L0/L1/L2 layers, temporal compression | Temporal layers | Memory-focused | Hierarchy + recall |
| Mem0 | Developer-friendly add/search, scoped memories | Limited | Needs a separate vector store | Vector-first |
| Zep / Graphiti | Bi-temporal knowledge-graph memory | Bi-temporal graph | Graph + retrieval | Hybrid semantic / keyword / graph |
| MemOS / Memori | OS- and filesystem-style memory | File-like | Memory-focused | Path + recall |
Pros and cons of the TemporalStore approach
Where it wins: one service instead of vector DB + cache + feature store + queue; native event-time storage with replayable, auditable decisions; filter-first retrieval that respects time validity and supersession, so fewer stale or out-of-scope chunks reach the prompt; large token savings from managed context packs; low latency at scale via a multi-layer cache; and open source with an enterprise path to disaggregated, five-nines storage.
Honest trade-offs: for pure fuzzy semantic recall a vector-first system can surface loosely-related text that filter-first traversal skips (TemporalStore treats vector recall as an optional add-on); OpenViking's hierarchical memory experience is mature; and TemporalStore is a younger open-source project still growing its ecosystem.
Head-to-head benchmark results vs OpenViking
On a shared open-source harness — the same reader model and embeddings for both systems, scored by an LLM judge — TemporalStore matches or beats OpenViking: overall 42% vs 34.7%, driven by long-horizon memory (LongMemEval 38% vs 16%), while LOCOMO is a tie at 44%. Retrieval hit@k is comparable-to-better (LongMemEval 0.98 vs 0.81), and managed context packs cut prompt tokens sharply at equal answer quality.
See the full LOCOMO + LongMemEval report, the 3-arm token-quota study, and the published landscape →
Keep reading