Agent Memory Layer: Dedup, Recency, and Model Compatibility
ustype · reddit · 2026-08-23
To solve news agents refetching articles, the author built a memory layer. Key design decisions:
- Dedup is the entire problem: Google News returns URL variants for one story. Hashing normalized title + publisher works best; keeping separate outlets for the same event preserves information.
- Store embedding model name: Swapping models silently breaks retrieval. Storing model name and dimension per row causes loud failures on mismatch.
- Recency belongs in ranking, not filtering: Filtering by date misses context. Now similarity is blended with exponential decay on age (3-day half-life).
- Same operations everywhere: Ingest, search, timeline, etc., exposed via Python API, CLI, and MCP. The MCP server allows agents to query memory across sessions.
Unsolved issue: article revisions (edits within the first hour). Uses local SQLite + vector store.
More from coding & agent
- Open Source Library: Install 103 Skills for Brand Building and Dev in Claude — tom_doerr · 2026-08-23
- Hands-on: Terra beats Sonnet, Flash unmatched on speed and quality — cgarciae88 · 2026-08-23
- Should AI Agents Be On-Call First Responders? — AustinZHenley · 2026-08-23
- YC-backed Archal launches stateful API sandboxes for testing AI agents — Scobleizer · 2026-08-23
- Agents Build Day Recap: Using Traces for User Recommendations — agihouse_org · 2026-08-23
- Use AI Agents as SM and PO to enforce quality in Scrum — JoeJustice · 2026-08-23