SELINA.ai
Sign in

Temporal memory: why AI agents need to remember when, not just what

Most AI memory systems store facts. Yours changed jobs, moved cities, switched from oat milk to almond. The facts land in a vector store, and the system retrieves them by semantic similarity. Ask it what you do for a living and it pulls the closest embedding. The problem: it might pull the old answer. The fact is there; the time is not. Memory without temporal ordering is a filing cabinet with no dates on anything. It works until it doesn't, and when it doesn't, it fails in ways that look like hallucination but are actually architecture.

Key Takeaways

What is temporal memory in an AI agent?

Temporal memory is the property of storing facts with an explicit time signature so an agent can distinguish what is current from what was once true. The concept maps directly to episodic memory in cognitive science: memories anchored to a moment, not floating in an undated semantic soup. A standard vector store treats "user lives in Berlin" and "user lives in Lisbon" as two embeddings of roughly equal standing. A temporal store knows the Berlin fact expired in March and the Lisbon fact is active now.

The distinction is not subtle in production. We see it every time a user updates a preference or corrects a prior statement. Without temporal ordering, the agent may retrieve the old fact if its embedding happens to sit closer to the query. The user experiences this as the system ignoring them. In reality, the system retrieved successfully. It just retrieved the wrong version.

Why does flat, undated memory break down?

Because the world changes and people change with it. A user who told your agent they were vegan in January and pescatarian in June has two true facts in memory. Without temporal reasoning, retrieval treats both as equally active, and the response depends on whichever embedding lands closer in vector space. That is not a retrieval failure. It is a design failure.

The failure mode compounds over time. A long-lived agent accumulates contradictory facts about the same entity: old addresses, former employers, deprecated preferences. Each one is semantically valid. Each one was true. The longer the agent runs, the more noise it generates for itself. Researchers describe temporal reasoning as the dimension most retrieval systems have addressed least, and this is consistent with what we observe. Most tools treat memory as a flat bag of facts.

The practical consequence: agents trained to be helpful start giving confidently wrong answers. They are not hallucinating in the traditional sense. They are faithfully retrieving a fact that used to be true. From the user's perspective, the difference is academic.

How do temporal memory architectures actually work?

The strongest current approach uses what researchers call "bitemporal" annotation. Every stored relationship carries two timestamps: event time (when the thing was true in the world) and ingestion time (when the system first learned it). This dual-clock scheme lets the system handle contradictory or updated facts without erasing history. The old fact is not deleted. It is superseded, marked with an end-of-validity timestamp, and kept for auditability.

This is architecturally different from vector-only stores, which typically overwrite or append without versioning. In a temporal knowledge graph, the edge between "User" and "Berlin" carries metadata: valid_from: 2024-09-01, valid_to: 2025-03-15, ingested: 2024-09-03. When the agent retrieves, it filters by the current moment and returns only active facts. When it needs historical context ("where did you live before Lisbon?"), it queries the superseded edges.

The accuracy difference is measurable. One graph-based system reports an 18.5% accuracy gain on time-sensitive queries versus vector-only baselines. On industry benchmarks, temporal queries showed the biggest year-over-year improvement: +29.6 points, alongside a +23.1-point gain on multi-hop reasoning. These are the two categories that most directly reflect how agents handle real user histories.

Independent analyses tell a similar story. Benchmarks show up to a 15-point accuracy spread between architectures specifically on temporal queries, making architecture choice more consequential than it might initially appear.

What does retrieval look like with temporal reranking?

Standard retrieval ranks by semantic similarity: find the stored facts whose embeddings are closest to the query embedding. Temporal retrieval adds a second axis. When the query is time-sensitive ("what's my current address?"), the system reranks results to prioritize recency over pure similarity. When the query is historical ("what was my address last year?"), it retrieves from the superseded set.

One vendor launched a dedicated Temporal Reasoning feature in May 2026 that gives every stored memory a time signature and manages evolving states like location or job history. The core idea: distinguish current, historical, and upcoming facts at retrieval time rather than treating all stored states as equally active. This is the right direction. It is also, candidly, early. The field is still converging on how to weight recency against relevance, and different use cases demand different trade-offs.

What does this look like in production at Selina?

We run a stack of frontier models, routed per task. Memory sits in a layer that persists across sessions, encrypted at rest, with content scoped to the individual user's namespace. When a user corrects a prior fact ("I moved to Porto, not Lisbon"), the system needs to handle that not as a new fact alongside the old one but as a supersession event. The old fact should remain queryable for context ("where did I live before Porto?") but should never be returned as current state.

Getting this right required us to think about memory as a timeline, not a document store. The engineering is less glamorous than it sounds. Much of it is bookkeeping: tracking when facts enter the system, when they are superseded, and ensuring retrieval filters correctly against the user's implied time reference. A question like "what do I usually order?" has an implicit recency bias. A question like "what did I order last Christmas?" has an explicit historical anchor. The retrieval system has to parse both.

We should be honest about the limits. Memory at Selina is NOT end-to-end encrypted. Content is encrypted at rest, but a slice of each request reaches a frontier provider at inference. This is an inherent constraint of working with external model providers. Files and transfers via SelinaSEND are zero-knowledge encrypted, but memory is not. We state this because temporal memory, by accumulating dated personal facts over time, raises the stakes on what happens to that data in transit. Pretending otherwise would be irresponsible.

Non-content operational metadata is kept for a short retention window, not indefinitely. Your account is protected. Your content is encrypted. These are different claims and we keep them separate deliberately.

Why is temporal metadata a privacy risk, not just a UX feature?

Most coverage of temporal memory frames "when" as a retrieval-quality improvement. That framing is incomplete. Timestamped, bitemporal fact graphs create a richer re-identification surface than flat vector stores. Knowing that someone lives in Lisbon is one thing. Knowing they moved from Berlin to Lisbon in March 2025, changed jobs in April, and updated their dietary preferences in June constructs a temporal profile that is, in effect, a behavioral fingerprint.

Current data-protection frameworks were not designed for systems that synthesize personal data across sessions and use it to shape future agent behavior. Purpose limitation, the GDPR principle that data collected for one purpose should not be repurposed, becomes genuinely hard to enforce when a temporal memory graph recombines facts from dozens of conversations into a single evolving profile. This is an identified gap in privacy law, not a theoretical concern.

A recent survey cataloging academic work on agent memory highlights papers on temporal validity in retrieval memory and privacy leakage in multi-agent systems, signaling that this is an active, unsettled research frontier. Stale-fact errors and cross-session profiling are two faces of the same coin: the system remembers too much or remembers incorrectly, and both create harm.

How hard is erasure in a temporal graph?

Harder than deletion in a relational database, and vendors are undercommunicating this. The entire point of bitemporal annotation is to preserve superseded facts rather than overwrite them. The old city, the old job, the old preference: they are all kept, timestamped, and linked into a causal graph. This is excellent for retrieval accuracy. It is structurally adversarial to "right to erasure" requests.

The European Data Protection Board's February 2026 coordinated action called the right to erasure one of the most frequently exercised GDPR rights. For persistent AI memory, the challenge is magnified because the same fact may exist inferred, summarized, embedded, and duplicated across a temporal graph. Deleting the source utterance does not delete the summary derived from it, the embedding computed from it, or the graph edge inferred from it.

Most vendor marketing celebrates that nothing gets lost. That is a feature for retrieval and a liability for compliance. The nuance, designing memory so that erasure requests cleanly remove a person's timeline without breaking the causal integrity of everyone else's data, is almost absent from current discourse.

At Selina, delete means gone. Actually gone. We treat this as a hard requirement, not a nice-to-have. When a user requests deletion, the system removes the content across all representations: the stored fact, the embedding, the graph edges. This is expensive in engineering terms. It means we cannot rely on lazy garbage collection or soft-delete flags. But the alternative, telling a user their data is deleted while fragments persist in derived representations, is not something we are willing to do.

Is forgetting a technical default or a governance decision?

It is a governance decision, and treating it as a technical default is how you end up with one-size-fits-all retention that serves no one well. A dietary preference and a security incident log have radically different retention requirements. The preference should decay or be overridable. The incident log might need to persist for audit purposes. Most memory systems today apply uniform retention, if they apply any at all.

The argument for privacy-by-design temporal TTLs (time-to-live values baked into memory architecture from day one) is straightforward: different categories of memory deserve different lifespans. A user's current city should supersede their old city. A record of a sensitive conversation might need to expire after a defined window. A billing preference might need to persist indefinitely.

We have found that the engineering cost of category-aware retention is modest relative to the compliance cost of not having it. The harder problem is taxonomy: deciding which categories exist and what their default TTLs should be. This is a product decision, not an infrastructure decision, and it requires thinking about memory as a policy surface rather than a storage layer.

What about multi-layer memory architectures?

Several recent systems implement memory as a stack of layers with different persistence and structure. Huawei's open-source openJiuwen project released JiuwenMemory in July 2026 with a four-layer stack that includes a knowledge graph and an async "dreaming" cycle. The dreaming process extracts and structures conversation histories into knowledge profiles in the background. This is architecturally interesting: it separates the fast path (immediate retrieval) from the slow path (offline structuring and consolidation).

The cognitive analogy is not accidental. Human memory consolidation happens during sleep, when the brain reorganizes episodic memories into more durable, structured representations. The agent equivalent runs as an async batch job, which is less poetic but serves the same function: turning raw conversation logs into queryable knowledge graphs with temporal annotations.

We are watching this space closely. The broader trajectory in agent memory is toward layered architectures that combine fast vector retrieval for recent context with slower graph-based retrieval for historical and relational queries. The temporal dimension cuts across both layers: recent memories need timestamps to avoid premature staleness, and historical memories need timestamps to enable accurate recall.

How should you evaluate a memory system's temporal capabilities?

Three questions cut through the marketing.

First: does the system distinguish current facts from superseded facts? If you update a preference, does the old value disappear from retrieval, get demoted, or continue to appear alongside the new one? Test this with a simple correction ("actually, I moved to Porto") and then ask for your current city. If it returns the old city even once, the temporal handling is not working.

Second: can the system answer historical queries? "What was my address last year?" requires the system to retrieve a superseded fact by its validity window. Systems that overwrite on update cannot do this. Systems that append without temporal annotation will return both the old and new address without indicating which was active when.

Third: what happens on deletion? Ask the vendor what "delete" means across all representations. If the answer involves only the source record and not the derived embeddings, summaries, or graph edges, the deletion is incomplete. This matters for compliance and it matters for trust.

Independent benchmarks now show meaningful accuracy gaps between architectures on temporal queries. Architecture choice is more consequential than it might initially appear, and the only way to know where a system falls is to test it on your actual use cases rather than relying on aggregate scores.

What remains unsolved?

Several things, and we would rather enumerate them than pretend they are handled.

Implicit temporal references are hard. "What did we talk about around the holidays?" requires the system to resolve "the holidays" to a date range, which depends on the user's cultural context. Most systems punt on this and treat it as a keyword query.

Cross-session causality is harder. If a user's decision in session 12 was informed by a recommendation in session 7, capturing that causal link requires more than timestamps. It requires event-level provenance tracking, which most architectures do not support.

Temporal privacy is an open policy question. Purpose limitation for data recombined across sessions remains unsolved in both law and engineering. User-level namespace scoping helps with GDPR compliance, but it does not address the deeper question of whether a system should be allowed to build an evolving temporal profile from data originally provided for individual, unrelated queries.

We do not claim to have solved these. We claim to be working on them with the constraint that privacy is not a feature to be bolted on after the retrieval layer is optimized. The temporal dimension makes memory more useful and more dangerous in roughly equal measure, and the engineering has to account for both.

Where this is heading

Temporal memory is not optional for agents that persist across sessions. The flat-bag-of-facts approach worked when agents were stateless and conversations were disposable. The moment you commit to remembering a user, you commit to remembering when things were true, and that commitment cascades into retrieval architecture, privacy engineering, and retention policy.

The research trajectory is clear: the biggest benchmark gains are on temporal and multi-hop queries, which are exactly the queries that matter for long-lived agents with real user histories. The privacy trajectory is equally clear: regulators are paying attention to persistent AI memory, and the systems that treat time-stamped personal data carelessly will be the first to face scrutiny.

We build Selina with the assumption that temporal memory is a dual-use capability. It makes agents more accurate and more accountable. It also creates a richer surface for profiling and a harder surface for erasure. Both are true simultaneously, and the architecture has to be honest about both.

If you want to see how we handle this in practice: start a free 7-day trial, no card required.

Frequently Asked Questions

What is temporal memory in an AI agent?

Temporal memory means storing facts with an explicit time signature so an agent can tell what is currently true from what was only true in the past. It mirrors episodic memory in cognitive science, anchoring facts to a specific moment rather than treating them as undated assertions.

Why does flat, undated memory break down?

Because people and facts about them change over time, and a flat vector store treats an old fact and its updated replacement as equally valid, retrieving whichever embedding is closest to the query. This isn't a retrieval failure but a design failure, since the agent faithfully returns a fact that used to be true, which looks like hallucination to the user.

How do bitemporal memory architectures actually work?

Bitemporal systems attach two timestamps to every stored fact: event time (when it was true in the world) and ingestion time (when the system learned it). Old facts aren't deleted but marked as superseded with an end-of-validity timestamp, letting the agent filter for current facts or query historical ones as needed.

What measurable improvements come from temporal memory architectures?

One graph-based system reports an 18.5% accuracy gain on time-sensitive queries versus vector-only baselines, and an industry benchmark found temporal queries had the largest year-over-year improvement at +29.6 points, alongside a +23.1-point gain on multi-hop reasoning. Independent analyses also show up to a 15-point accuracy spread between architectures specifically on temporal queries.

Why is temporal metadata considered a privacy risk, and how does Selina handle memory encryption?

Timestamped, bitemporal fact graphs create a richer re-identification surface than flat stores, since a sequence of dated facts can form a behavioral fingerprint, and current data-protection frameworks like GDPR's purpose limitation weren't designed for this kind of accumulating, time-ordered personal data. At Selina, memory is encrypted at rest but not end-to-end encrypted, because a slice of each request reaches a frontier provider at inference, which the article states plainly given the added stakes of accumulating dated personal facts.

Sources & References

Michael C.

Michael C.

Founder & Principal Engineer, Selina Labs

Michael builds Selina, a privacy-first AI that remembers you across conversations. He ships security-sensitive AI in production — real attacks, real fixes, measured in minutes and dollars — and writes about privacy, security, and LLMs from that seat. Top Rated Plus and expert-verified on Upwork.

Learn more about Selina.ai