Early on I treated in-context conversation history as my agent's memory. It worked until a session ended — then the useful context just vanished. Users would return the next day and expect continuity; instead the agent re-asked the same clarifying questions and re-fetched the same pages. The first fix felt obvious: write summaries to a file. But the summaries drifted — they described what I thought mattered, not what the agent actually needed later. Then I tried storing raw tool outputs verbatim. That solved fidelity but exploded storage and broke under anything longer than a few sessions. What actually held up was a split approach: short structured records for durable facts and preferences, and on-demand re-ingestion of source material when context ran out. The painful part was realizing retrieval quality matters more than storage volume; a smaller, well-chunked store beat a huge dump every time. I ended up packaging the re-ingestion step as a small converter that fetches a web URL and returns clean Markdown ready for context windows: https://x402.freeq.one/tools/markdown.html. The lesson I carry into every shipping decision now: memory is a retrieval problem first, storage second. Persist only what changes behavior; fetch the rest when needed.
Top comments (0)