docs/platform/features/temporal-reasoning.mdx
Temporal Reasoning gives a ranking boost to memories whose event dates match the time in a search. Event dates are when something described in a memory happened or will happen. It runs automatically on Mem0 Platform v3.
It is not available in the OSS SDK.
Dates from new memories usually affect search within a few seconds.
Queries can include expressions such as yesterday, last week, tomorrow, currently, and as of March 2025. Mem0 compares them with dates and date ranges found in stored memories.
Suppose a user has these memories:
Searching for Which city did I meet Maya in at the Orion conference last week? gives the Tokyo memory a temporal boost and ranks it first.
const results = await client.search(
"Which city did I meet Maya in at the Orion conference last week?",
{ filters: { user_id: "maya-demo" } }
);
Search returns the usual memory results, reordered using the temporal boost.
Use reference_date to simulate searching at a specific date and time. Mem0 treats it as the current time for that search.
const results = await client.search("What happened last week?", {
filters: { user_id: "user-123" },
referenceDate: "2025-03-21T00:00:00Z",
});
| Action | Python | TypeScript | Purpose |
|---|---|---|---|
| Add memories | timestamp | timestamp | Preserve the original time of an imported conversation. |
| Search memories | reference_date | referenceDate | Simulate searching at a specific date and time. |
For all search inputs and returned fields, see the Search Memories API reference.
<CardGroup cols={1}> <Card title="Memory Timestamps" icon="calendar" href="/platform/features/timestamp"> Preserve the original time of imported memories. </Card> </CardGroup> <Snippet file="get-help.mdx" />