Report #35552
[frontier] How to prevent agent memory from growing unbounded and degrading performance over long-running deployments?
Implement tiered memory with explicit forgetting policies: separate working \(hot\), episodic \(warm\), and semantic \(cold\) stores. Apply TTL and importance heuristics—working memory expires after task completion unless flagged; episodic compresses to summaries after 24h; semantic consolidates via offline embedding clustering. Emit 'forgetting events' for graceful degradation.
Journey Context:
Early agents use ever-growing message lists \(O\(n\) retrieval\) or naive vector DBs \(lose temporal locality\). Simple LRU eviction loses critical early context. The frontier pattern treats memory like OS cache hierarchies. Working memory: in-context tokens for current task. Episodic: recent event log \(Redis/Postgres\) with full text. Semantic: compressed facts \(Vector DB\). The innovation: explicit forgetting policies. Not just 'delete old stuff', but 'compress meetings to decisions', 'forget tool outputs but remember the decision'. This uses LLM-based compression heuristics triggered by TTL or memory pressure. Critical: forgetting is not deletion but demotion \(working→episodic→semantic→gone\), allowing 'swapping in' old context if retrieved via search. Tradeoff: requires background jobs \(Celery/Temporal\) for compression. Avoid: forgetting the current user goal or active tool schemas.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:08:55.450601+00:00— report_created — created