Open-source context serving engine
The context engine for AI agents.
TemporalStore is a time-aware memory engine built for one job: serving the right context to an LLM at request time. It stores what happened, when it happened, what changed, and what the agent already tried — then answers bounded, fresh, permissioned context queries on a single low-latency path. Open source, enterprise-supported by MatrixArk.
What it is
Time-aware context memory, served in the request path.
Most agent stacks treat time as logs or TTLs. TemporalStore treats it as a first-class serving primitive. Every memory carries an event time, a validity window, a scope, and a permission, so the prompt can decide what to trust, ignore, replay, or refresh right now — not after the fact.
Underneath is a temporal key-value model: append-only events, latest-value state per entity, secondary indexes, and freshness windows. Context comes in as ordinary agent output — messages, tool results, corrections, decisions — and comes out as a bounded, token-budgeted context pack that fits the model call.
One serving path, four guarantees
- Temporal — ordered timelines, valid-as-of reads, superseded facts stop entering current prompts.
- Fresh — windowed counters and recency signals decide which memory is still worth including.
- Replayable — every returned context pack is a compact manifest you can reconstruct and audit.
- Bounded — declared indexes and query budgets keep the hot path fast instead of scanning JSON.
get_context_pack({
raw_query: "Can we buy another GPU batch this week?",
scope: { team: "platform", project: "project_1" },
as_of: "2026-06-14T18:00:00Z",
budget: { max_prompt_tokens: 1200, deadline_ms: 30 }
})
// TemporalStore serves, bounded and valid:
ContextPack {
latest: approval:gpu_batch (approved, limit $80k, valid_until 2026-06-30),
timeline: 3 recent cost events in window,
stale: 1 superseded approval excluded,
replay_id: "cp_9f21c4", // reconstruct exactly what the model saw
tokens_used: 940
}
Architecture
From the context boundary to durable storage — one engine.
Agents call a simple context boundary. Inside, the serving core resolves scope, model, and window; MatrixCache and MatrixRaft keep hot state fast and durable; tiering moves data from memory to shared storage; and enterprise backends provide durable capacity at scale.
The serving core and its runtime dependencies are open source. Enterprise backends are optional durable tiers you add when context data outgrows local disk and replicated storage.
How context flows
Ingest, serve, replay — without a new pipeline per question.
Ingest is forgiving
Send raw agent output — a message, tool result, correction, or decision. The engine extracts entities, event time, validity, and scope, then appends a typed event and updates latest state. No hash keys or index layouts for the caller to design.
Serving is strict
At prompt time, reads run against declared indexes with a scope, a valid-as-of time, a window, a limit, and a deadline. The result is bounded and permissioned — never an open-ended scan in the hot path.
Replay is free
Every context pack is stored as a manifest: included ids, excluded stale ids, token budget, and a replay id. Debug, evaluate, and explain exactly why a memory entered the prompt.
// 1. Ingest (raw, forgiving)
ingest({
kind: "tool_result",
content: "Alice approved a GPU batch up to $80k until Jun 30.",
observed_at: "2026-06-14T16:20:00Z"
})
// 2. Serve (bounded, valid-as-of)
query({
collection: "approvals",
valid_as_of: now(),
filters: { status: "approved" },
limit: 20, deadline_ms: 30
})
// 3. Replay (audit what the model saw)
replay("cp_9f21c4")
-> included, excluded, budget, source refs
When to use what
Start with the open-source engine. Add a backend when scale demands it.
| Layer | Use it for | Licensing |
|---|---|---|
| TemporalStore + local disk | Single-node agents, dev, edge, and self-hosted context serving. The default starting point. | Open source |
| TemporalStore + MatrixRaft | Replicated high availability for context memory without shared storage. | Open source |
| MatrixObject Enterprise | Disaggregated, concurrent, elastic shared storage for context data at five-nines scale. | Enterprise |
| MatrixKV Enterprise | Transactional metadata and canonical truth — permissions, leases, approvals, ownership. | Enterprise |
| MatrixDB Enterprise | High-throughput, Redis-compatible profile and cache KV beside the context path. | Enterprise |
Go deeper
Read the source, then the reasoning behind it.
TemporalStore is open source at temporalstore.ai — the serving core, MatrixCache, and MatrixRaft, with a Rust implementation you can run in your own perimeter. MatrixArk adds the enterprise storage backends, on-premise deployment, and support around it.