intelligence_src_6dc544294b7f21f98a
- Source-provided label
- Publisher RSS metadata
- Evidence class
- mentioned in report
- Confidence
- Not reported
- Observed
- Nov 27, 2026 17:51 UTC
- Retrieved
- Nov 27, 2026 17:55 UTC
Agent Memory Persistence Across Sessions: Redis, Vector Databases, and Hybrid Patterns TL;DR: Agent memory persistence across sessions works best as two stores with different jobs. Redis holds the current session's state and recent turns with a TTL, keyed by tenant and session. A vector database such as pgvector holds distilled long-term facts, filtered by user before similarity ranking. A background worker moves facts from the first store to the second, so the agent's reply never waits on extraction. Key Takeaways "Memory" is three different things with different lifetimes: working state for one task, the recent conversation, and long-term facts about a user. Persisting all three in one store is the most common design mistake. Redis fits session state because it offers fast keyed reads, atomic multi-command writes, and per-key expiry. It is a poor primary home for facts that must survive for months, because its data lives in memory and its durability depends on persistence settings. A vector database fits long-term memory because recall is a similarity question ("what do I know that is relevant to this message?"), not a key lookup. Filter by tenant and user before ranking, or one customer's memories can reach another customer's prompt. The hybrid pattern writes every turn to Redis on the hot path and publishes an event to a Redis Stream. A consumer group extracts facts and upserts them into the vector store asynchronously, with idempotent writes so retries cannot create duplicates. Store which embedding model produced each vector, mark superseded facts instead of deleting them silently, and make deletion cover every copy, including stream entries and caches. The code below is a reference implementation with stated prerequisites. No latency or recall benchmark was run for this article; measure on your own workload before choosing index parameters or TTLs. What does agent memory persistence across sessions actually mean? A session is one bounded interaction: a chat thread, a support ticket, a single run of a coding agent. Inside a session, the model sees its context window, and the framework usually keeps the message list in process memory. When the process restarts, the user comes back tomorrow, or a second replica picks up the next request, that in-process memory is gone. Persistence across sessions is the work of saving what the agent needs and loading the right subset back into the next context window. It helps to split memory by lifetime and access pattern, because each split points to a different storage choice: Memory type Example Lifetime Access pattern Working state Current plan step, tool results, a draft order Minutes to hours Read and write by session ID, every turn Short-term history The last 20–50 turns of this conversation Hours to days Append, read the tail Long-term semantic memory "Prefers TypeScript", "Account is on the enterprise plan" Months, until changed or deleted Similarity search scoped to a user Episodic memory A summary of last week's debugging session Weeks to months Similarity or time-range search The first two are keyed lookups with a natural expiry. The last two are retrieval problems. That difference, more than any vendor feature list, is what decides the Redis vs vector database question. Our earlier piece on agent memory management covers the conceptual taxonomy; this article is about the storage and code. Why not just save the whole transcript and reload it? Replaying the full transcript is the simplest form of persistence, and for short-lived assistants it is fine. It breaks down in three predictable ways. First, it does not fit. A user with fifty prior sessions has more history than any context window should carry, and truncating from the front throws away exactly the old facts that made persistence worthwhile. Second, it costs on every turn. Every token reloaded into the prompt is paid for again on every model call in the sessi
a6b473de47a0387b66161cb8b01689655e7820e5f6c0180c417ab0c500a92a34Network indicators are visibly defanged. This page does not make them clickable or send them to another service.
No validated file hashes or network indicators are stored for this record.
This record contains metadata and attribution only. It does not host, download, unpack, render, or execute malware samples.
Sources represented on this page. Publication and observation dates describe the content; successful batch dates describe local collection. A recent batch does not certify complete coverage or current provider availability.
1 sources: 0 stale, 0 needing attention, 0 paused, 0 unverified.
Stale means older than twice the recorded collection interval, with a minimum of one hour; without an interval, the threshold is 24 hours. Cached content remains available while a feed is stale, paused, or unverified.