Originally created by: Thanatos9404
Memory._render stamped every turn of a session with the session's first turn's time. Turns without a run_id are grouped by calendar day (_session_key returns ("day", user_id, agent_id, date)), so turns added hours apart on the same day all showed the first turn's time. That is the normal case for the llmslim mcp memory server.
Reproduced on PyPI 0.11.1: two turns stored at 10:30 and 16:45 on 2026-10-20 both rendered as [2026-10-20 (Tue) 10:30], although get_all returns 16:45 for the second.
Memory._stamp(item) formats one turn's created_at in tz with stamp_format. _render calls it for each turn.test_mixed_stamps_stay_on_their_lines).Memory, Memory.search and MemoryContext docstrings, docs/MEMORY.md and the changelog now say each turn shows its own time.Other renderers checked:
llmslim/mcp_server.py _preview (used by list_memories) already prints each item's own created_at.benchmarks/live/round3/build_lme.py and build_locomo.py build their own [date] role: content lines from the dataset's session dates and do not use Memory. They are unchanged.No, not when every turn of a session has the same timestamp. LongMemEval and BEAM data are loaded that way, with the session date on every turn. In that case each turn's stamp is the first turn's stamp, so the text going into selection is byte-identical. Selection is deterministic, so the selected context is byte-identical too.
test_turns_sharing_a_time_render_as_before checks this end to end against the old renderer. It runs once at a budget where the whole history fits and once at a budget where LLMSlim has to select.docs/MEMORY.md still holds for the same reason.Contexts change only for sessions whose turns have different times: turns the MCP server groups by day, or a run_id session whose turns carry their own timestamps. Each of those lines now shows its own time. The stamp is no longer shared, so it is not shown once as a header, which costs a few tokens per kept turn.
test_same_day_turns_show_their_own_times: the 0.11.1 reproduction (10:30 and 16:45 on one day).test_selected_turns_keep_their_own_times: the same check on a long history, where LLMSlim selects.test_turns_sharing_a_time_render_as_before: output identical to the old renderer when timestamps are equal, with and without selection.Full suite on Python 3.12 with .[all,dev]: 1913 passed, 10 skipped, total coverage 93.02%. On main in the same environment: 1907 passed, 10 skipped, 93.02%. llmslim/memory/_core.py coverage went from 93.31% to 93.33%. ruff check, ruff format --check and mypy llmslim/memory are clean.
feat/memory-r6 has the same _render, and this change needs to be carried into it. This PR does not touch that branch because a benchmark run is editing it. When it is ported, check that the r6 BEAM loader gives every turn of a session one timestamp. If it does, r6 contexts stay byte-identical.
Originally posted by: vercel[bot]
The latest updates on your projects. Learn more about Vercel for GitHub.