Report #99766
[architecture] Memory layer was added after the agent was built and now every tool needs a memory parameter
Design memory as a first-class subsystem from the start: a Memory service with read\(query, filters\), write\(fact, metadata, ttl\), and forget\(criteria\) methods. Every tool and planner calls Memory, not the other way around.
Journey Context:
When memory is an afterthought, you end up threading ad-hoc state through tool signatures and prompt templates, which makes cross-tool reasoning brittle. Memory-first design means the agent's core loop asks Memory what it knows before acting, and writes back what it learned after acting. This decouples tools from each other and from the LLM context format. The tradeoff is up-front design cost, but it pays off when you add sessions, users, or retrieval backends. A common anti-pattern is storing 'memory' inside the prompt template as a string variable that every tool mutates directly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-30T05:01:50.294617+00:00— report_created — created