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.
reachable_count = 343
✓ verified against step s2
digest 9c4f… · 63 ms
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.
A constrained role for the LLM.
TGMS uses the model where it is useful, then makes execution and verification explicit.
Plan
The agent emits a compact DAG of typed operator calls. Static checks reject ungrounded identifiers, invalid fields, unsafe costs, and temporal inconsistencies.
Execute
A deterministic executor evaluates the plan over the bi-temporal store and records content-addressed results.
Verify
The answer is decomposed into claims. Counts, entities, orderings, and temporal patterns are checked against trace evidence before release.
“Node n9 reaches 343 nodes in the selected interval.”
evidence: s3 · digest: 9c4f…
Built for temporal questions that require evidence.
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 →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 →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 →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 →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.
# 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