Use Temporal Reasoning when…
- Users ask questions like “what happened last week?” or “what do I have coming up?”
- Your app stores both past events and future plans for the same person
- You want time-aware retrieval without building your own date-parsing layer
Configure access
Confirm yourMEM0_API_KEY is set and that you are using the v3 Platform client:
How it works
When a memory describes an event, a future plan, or an ongoing state, Temporal Reasoning recognizes the time context so the right results surface at search time. A query likewhat did I do last week? should return a completed past event: not an upcoming appointment and not a stable fact that hasn’t changed. Temporal Reasoning handles that distinction automatically.
Memory types Temporal Reasoning handles
Results come back in the normal search response shape: Temporal Reasoning affects ranking, not the response format.
Configure it
Temporal Reasoning is enabled by default for all v3 searches and writes. There is no per-request toggle. Two parameters give you precise control when you need it:observation_date(orobservation_datetime, which takes priority when both are set) onadd(): anchors an imported memory to the time it actually happened. Pair withtimezonewhen resolving a date-only value.timestamponadd(): a Unix epoch that sets the memory’s creation time. When present it takes priority overobservation_datetimeandobservation_dateas the anchor Temporal Reasoning ranks against, so pass only the one you want to win.reference_dateonsearch(): resolves relative phrases likelast weekagainst a fixed point in time
Supported query patterns
Historical questions
Historical questions
Examples:
last week, last month, in March 2025, on 2025-03-10Upcoming questions
Upcoming questions
Examples:
upcoming, next week, tomorrow, what do I have coming up?Current-state questions
Current-state questions
Examples:
right now, currently, where do I work now?As-of questions
As-of questions
Examples:
as of March 2025, where was I living as of 2024?Duration questions
Duration questions
Examples:
how long have I lived here?, since when have I worked there?Verify the feature is working
- Run a temporal search with a time-aware query (e.g., “what did I do last week?”) and confirm the memory that fits the time window ranks first.
- Use
reference_datein test queries so relative phrases resolve consistently across runs. - For backfilled data, pass
timestamponadd()to confirm the memory reflects the right point in time.
Best practices
- Use explicit dates in source conversations when events or plans matter temporally.
- Pass
observation_date(orobservation_datetime) during historical imports so the ingestion time does not become the only time anchor. Do not also passtimestampon those calls, since it overrides both as the ranking anchor. - Scope searches with
filtersso time-aware ranking operates inside the right user boundary. - Use
reference_datein automated tests and reproducible demos.
Memory Timestamps
Anchor imported memories to when they actually happened.
Discord
Join our community
GitHub
Ask questions on GitHub
Support
Talk to founders