DEV Community

leo-wang
leo-wang

Posted on

Memory Doesn't Exist — You're Just Forging History

There's a team whose death I remember especially well. They built a customer-service Agent with a "user profile" — a user says "I'm a VIP customer, Zhang Wei" once, and in every conversation after the Agent "remembers." The product manager asked in the demo: "Will you remember me?" — "Of course, I'll always remember you, Mr. Zhang." They high-fived and shipped. Day one in production, a customer reported: "Your AI says it doesn't know me."

No line of code was wrong. What was wrong was the assumption that conversation.append() could hang memory onto the model. The LLM API is a pure function — response = f(messages, params). No session, no cookie, no cross-request state. From the moment they shipped, they were just stuffing a long chat log back into the API verbatim every time: forget to stuff, truncate, or restart the container, and the memory never existed. The essence of memory lives in your code and your database, not the model.

My take: the Memory layer's engineering maturity is often the decisive factor in whether a system can ever reach shipping. Models can be swapped, frameworks rewritten — but if the Memory layer is designed wrong, all prior conversation data is garbage and you start over. That's why this series places Memory ahead of Frameworks.

Read the full 60-article series — $79 one-time, lifetime access → https://buy.stripe.com/5kQ6ozeEsbKabvzdMQ97G00


Production-Grade AI Agents — by Leo Wang · Follow on X · Subscribe

Top comments (0)