TemporalStore.AI GitHub

Flagship use case: Context

Replayable context memory for AI agents and coding systems.

TemporalStore.AI focuses on the Context data model: session memory, tool-call history, retrieval evidence, summaries, safety counters, and decision replay. Other temporal workloads prove the same store can serve real online state.

Primary product story

Context is the flagship use case. Other workloads are bonus proof.

TemporalStore gives AI agents a real memory substrate: temporal writes, model-aware context, compact retrieval, safety counters, and replayable evidence. Risk, ads, and recommendation examples remain on the site as supporting examples of the same engine.

Start here

The pages people were missing are now first-class routes.

Flagship use case Context memory for agents and coding sessions Session history, tool traces, retrieval evidence, safety counters, and replay. Benchmarks Latency, scale, context quality, and storage parity reports Open benchmark summaries and source artifacts. Supporting data models TemporalCounter, TemporalAggregate, TemporalDistinct, Sequence, Profile, Context Context is the headline; the other models support the broader temporal store. API shape Write events, query windows, build agent context See the serving interface at a glance.

Why it exists

Modern AI and risk systems need more than latest-value KV.

Agents, fraud models, ad serving, recommendation systems, and real-time product policies all ask temporal questions: what happened recently, how often, in what sequence, under which filters, and with what replayable evidence?

Most teams approximate that with stream jobs, caches, feature tables, and application logic. TemporalStore moves those temporal primitives into the serving engine so open source users can build, inspect, benchmark, and improve the actual online state layer.

Architecture

Designed around event time, entity locality, and model-aware storage.

Clients

SDK writes stream consumers online reads replay jobs

Serving core

namespace + table router partition worker temporal model executor query planner

Persistence

WAL / oplog page store snapshot index recovery replay

Data models

Context first, with supporting temporal primitives for online state.

Open the full data model and use-case page

TemporalCounterbucketed counts, sums, rates, caps, and velocity checks
TemporalAggregatefiltered sum, min, max, count, and grouped rollups
TemporalDistinctunique devices, merchants, campaigns, sessions, and IPs by window
Sequenceordered behavior history for rankers, agents, and investigation tools
Profilelatest entity facts colocated with temporal history
Contextflagship model for agent memory, tool events, retrieval traces, summaries, replay, and safety counters

API shape

Small primitives, explicit semantics, testable behavior.

Ingest event

ts.put_event(
  table="checkout_events",
  entity="user_42",
  ts_ms=event.ts_ms,
  attrs={
    "merchant": "m_812",
    "amount_usd": 129.50,
    "country": "US"
  }
)

Read feature window

features = ts.window(
  table="checkout_events",
  entity="user_42",
  range="15m",
  metrics=[
    "count",
    "sum(amount_usd)",
    "distinct(merchant)"
  ]
)

Build agent context

context = ts.context(
  entity="workspace_7",
  streams=["tool_calls", "decisions"],
  since="24h",
  summarize=True,
  include_evidence=True
)

Contributor map

Good open-source work starts with narrow, inspectable problems.

01

Benchmark harness

Separate ingest throughput, read latency, sequence scans, distinct cardinality, and mixed workload tests.

02

Storage engine

WAL records, snapshots, page cache policy, object encoding, and replay correctness.

03

Query engine

Window planning, filter pushdown, distinct algorithms, sequence scans, and result explainability.

04

Agent memory

Context streams, tool-event schemas, memory summarization hooks, and retrieval evidence.