Research prototype · v0.8.0

Verified temporal reasoning for LLM agents.

TGMS is an agent-native bi-temporal graph management system. It gives agents deterministic temporal operators, executes plans over a versioned graph, and checks every answer claim against the resulting trace.

15 verified temporal operators Bi-temporal by default Apache-2.0
Agent Plan a tool DAG
Static checks Grounding, contracts, cost
Graph store Valid time × transaction time
Executor Deterministic operator results
claim c1
reachable_count = 343
✓ verified against step s2
digest 9c4f… · 63 ms
62.8%
Normalized typed-answer accuracy at 32B
94-task frozen CollegeMsg split, Qwen2.5-32B fp16, single seed; the strongest baseline at any size reached 27.7%.
85-90%
Correction probes answered
Questions whose answer changes after a correction, across two frozen suites. The best evaluated retrieval baseline reached 15.4%; the two latest-state baselines scored zero.
0
Unsupported claims, with gating
Of the 199 answers the gated system emitted across 282 task runs. Coverage is 199 of 282, so part of the zero is bought by declining to answer.
The system

Separate temporal reasoning from language generation.

The model decides which operations to compose. TGMS handles identifiers, temporal semantics, graph computation, arithmetic, and evidence checking.

Bi-temporal graph state

Every fact records when it was valid in the world and when it was known to the system. TGMS can distinguish change from correction and reproduce a past belief state — and if a correction lands after you already have an answer, tgms trace check tells you: sound by construction, measured at 0 false-fresh verdicts where the naive "did the correction touch a stored row" rule is wrong 47.4% of the time. Registered results go further and refresh themselves: a downstream result's staleness propagates one hop through its declared dependencies, 99.0% of those propagation checks resolve without recomputing anything, and the maintenance campaign measured 0 false-fresh in 37,371 trials across every arm.

Verified operator toolbox

15 typed tools cover temporal reachability, motifs, diffs, bursts, interval joins, grouped aggregation, and the belief log itself. Each tool is deterministic, bounded, and tested against an independent oracle. Underneath them, a compositional IR (TGIR) now compiles labelled multi-way pattern matching against the same guarantees, moving measured expressiveness from 3 to 24 of 41 LDBC SNB read templates and from 94 to 102 of 110 independently written questions — exactly at a forecast frozen before either row was measured.

Trace-grounded answers

Plans, operator arguments, result digests, and answer claims remain linked in one auditable trace. Claims that are unsupported or derived from truncated evidence do not pass the verifier.

How it works

A constrained role for the LLM.

TGMS uses the model where it is useful, then makes execution and verification explicit.

1

Plan

The agent emits a compact DAG of typed operator calls. Static checks reject ungrounded identifiers, invalid fields, unsafe costs, and temporal inconsistencies.

2

Execute

A deterministic executor evaluates the plan over the bi-temporal store and records content-addressed results.

3

Verify

The answer is decomposed into claims. Counts, entities, orderings, and temporal patterns are checked against trace evidence before release.

trace.html deterministic execution
s1 resolve_entities("n9") 2 ms
s2 temporal_reachability(src=$s1.uid) 63 ms
s3 compute(count($s2.rows)) <1 ms
Verified claim
“Node n9 reaches 343 nodes in the selected interval.”

evidence: s3 · digest: 9c4f…
Use cases

Built for temporal questions that require evidence.

01

Temporal graph analytics

Call verified operators directly for time-respecting paths, interval joins, temporal motifs, bursts, and snapshot differences. No LLM is required.

See the CLI workflow →
02

Agent tool serving

Expose the operator algebra through a stateless, read-only MCP server so an agent can query a shared temporal graph through typed contracts.

See supported interfaces →
03

Auditable investigations

Compose multiple operations, reproduce the belief state used for a past decision, and retain a trace that links each answer claim to its evidence.

Open an example trace →
Native storage engine

Temporal storage and kernels designed for the workload.

The default backend uses valid-time-clustered segments, compact column encodings, and native temporal kernels. Cross-system evaluation verifies answer equality before performance is measured.

Read the engine design →
14.7 ms Temporal traversal at 200K events; the graph engines measured here take 3.9-7.3 s.
24.6 B/row · 1.76 GB On-disk footprint, and peak memory for the full 10M-event query suite under a 2 GB cap.
6 systems, 13 queries, 0 gaps Every answer hash-verified across TGMS, DuckDB, PostgreSQL, ClickHouse, Neo4j, and Memgraph before any timing.
400 probes vs XTDB, 0 disagreements Bi-temporality is inherited from SQL:2011 and systems like XTDB, not invented here — and the head-to-head shows both systems mean the same thing by it, with TGMS 3.9–4.7× faster at correction-heavy ingest.
Get started

Run the operators and guided demo locally.

Operators, task suites, and the verifier work offline. The agent loop can use any OpenAI-compatible endpoint, including a locally served model.

Detailed experiments, frozen splits, determinism receipts, and current coverage limitations are documented in the paper and the evaluation report.

Three hands-on tutorials cover the rest of the path: bring your own temporal graph data, give TGMS to an agent over MCP, and audit an answer. The stability contract states what you can rely on across versions; the public roadmap states what's next.

terminal quickstart
# Two commands: install, then the guided arc —
# current belief, pre-correction belief, and the trace
pip install tgms
tgms demo

# Working from source instead (tests, frozen store, web UI)
git clone https://github.com/zxf-work/tgms
cd tgms
uv sync --extra agent
make test
uv run tgms replay \
  benchmarks/frozen-v1/collegemsg.eventlog.jsonl \
  --store stores/collegemsg
bash scripts/run_webapp.sh

Explore the system, evidence, and open research questions.

TGMS is an open-source research prototype from the University of Memphis.