The pattern
Use evolving memory when facts can change over time and you need both the current truth and historical trail. Good candidates:- Content strategy (what is working right now)
- Active product priorities
- Temporary experiments and their outcomes
- Current customer state or lifecycle stage
Example: LinkedIn content strategy
A LinkedIn post generator that adapts to changing strategy: Step 1 - Save initial strategy:Temporal awareness - automatic and explicit
MemContext automatically detects time-sensitive content during save. For example:- “LinkedIn algorithm favors short posts right now” → auto-classified as medium-term, expires in 30 days
- “Meeting with client tomorrow at 3pm” → auto-classified as short-term, expires in 7 days
- “User prefers TypeScript” → auto-classified as permanent, no expiry
validUntil to override the auto-detection:
scope for all memories that belong to the same end user or tenant. The project groups the LinkedIn generator context inside that isolated lane.
If you pass validUntil, auto-detection is skipped entirely. After April 25, this memory will not appear in search results.
Recommended flow
- Save current working strategy as a
factordecision - Generate content by combining profile context and search results
- Observe outcomes
- Save lessons as new memories (
decisionorcontext) - Submit feedback on memories that were useful or stale
- When strategy changes, save a new memory - the system handles supersession automatically
Feedback-driven ranking
When you usememory_feedback to mark memories as helpful, outdated, or wrong, search results are re-ranked accordingly:
- “Wrong” memories are pushed to the bottom (0.3x score)
- “Outdated” memories are demoted (0.5x score)
- “Helpful” memories get a small boost (1.1x score)
Why this works
You do not need fine-tuning or retraining for this class of problem. You need:- Current truth (served by
isCurrentfiltering) - Auto-expiry of temporal content (auto-TTL classification)
- Historical trail (accessible via the history endpoint)
- Retrieval that handles both semantic and exact-match queries (hybrid search)
- A feedback loop that directly affects ranking (via
memory_feedback)
