Giving an AI Agent 8x faster Memory: What We Learned Building One A team building an on-call and triage agent for flight-booking failures reported that replacing Confluence as its memory store with a self-hosted Qdrant index plus an S3 cache delivered 8x faster search and 5x faster read, at the cost of a 5-minute staleness window on updates. The team chose self-hosted Qdrant over S3 Vectors specifically for hybrid search, because triage queries contain exact tokens such as error codes, booking IDs, supplier names and ticket keys that pure semantic search handles poorly. The write path still touches only Confluence, so the derived index can be rebuilt from the source of truth if the storage decision is revisited. Lessons from building the memory layer for an on-call and triage agent. Written for engineers who are about to build the same thing. A large language model is stateless. Every run starts from a blank context window. For a chatbot that is tolerable. For an agent that does real work every day, it causes four problems. 1. It repeats work it has already done. Take an on-call agent that triages a flight-booking failure. On Monday it spends 40 tool calls working out that a supplier timeout is the cause. On Tuesday it sees the same symptom and starts from zero. Nothing was learned. 2. It repeats mistakes, and no one can correct it for good. A human reviewer says, “for payment failures, check the gateway status first, not the app logs.” Without memory that feedback lasts one conversation. Someone has to re-type it into a prompt forever. 3. It cannot build on its own history. Questions like “has this happened before?”, “what did we conclude last time?” and “is this a new failure or a regression?” can only be answered if past runs are stored somewhere the agent can query. 4. Context windows are not a substitute. Stuffing everything into the prompt gets expensive and slow, and quality drops as the window fills. The right facts have to be retrieved when they are needed. That is a memory system. The pitch in one line: memory turns an agent from a function into a colleague who accumulates experience. The vocabulary comes from cognitive science, and it maps well onto agents. Most confusion in design discussions comes from mixing these up, so it helps to name them. Three more forms sit alongside these. They aren’t separate cognitive categories, but you will meet them: In our on-call triage agent we deliberately focused on two: episodic and procedural. Episodic is “what happened,” stored as reports. Procedural is “how to do it,” stored as playbooks and triage rules. Those two gave us most of the value. Semantic and user memory can come later. The most useful question is: what is the agent going to do with this information? Practical rules of thumb: Earlier choice was to use confluence as a memory. But the read and search time was huge enough to motivate us and go for optimisation. The design goals were: durable and human-readable, fast enough for in-loop recall, and cheap to operate. With this we have achieved 8x faster search and 5x faster read. The write path only touches Confluence. Everything else is derived, so any of it can be rebuilt from Confluence. S3 Vectors looked attractive: we already run on S3, there is nothing to host, and it is cheap. We still chose self-hosted Qdrant, for one reason: hybrid search. When S3 Vectors would be the right call: you only need semantic similarity, your queries are natural language rather than identifiers, you want zero infrastructure, or you’re at a very large scale where storage cost dominates. Choose based on whether your queries contain exact tokens. If they do, you need hybrid search. One design consequence: because the index is derived data, this decision is cheap to revisit. If S3 Vectors gains sparse support, we can rebuild the index from Confluence without touching the source of truth. The tension: we wanted memory that humans can read, edit and delete Confluence , but an agent loop needs fast, predictable recall, and Confluence is neither fast nor built for machine-scale reads. The S3 cache resolves this without giving up either goal: The price is the 5-minute staleness window on updates 5.6 . For agent memory, where notes are written once and recalled later, we judged that a good trade. fresh=True covers the cases where it isn't. The pattern in general: keep a human-friendly system of record, and put a machine-friendly, disposable read layer in front of it. You get trust from the first and speed from the second. Pure semantic search is bad at exact tokens: error codes, booking IDs, supplier names, ticket keys. Those are exactly what triage queries contain. Pairing dense embeddings with BM25 and fusing the results fixed most of the “why didn’t it find the obvious one?” cases. It also let us pick Qdrant over a vector-only store, because it supports dense, sparse and fusion natively. Our first instinct was to let the agent choose a path or parent page for each write. That failed in the obvious way: agents invent slightly different folder names, and the tree turns into a mess. The fix was to make the server own placement. The agent passes domain, type and a title. The agent can't get the layout wrong because it never sees it. Rule: give agents intent-level tools “save this report for the domain” , not storage-level tools “create a page under parent 4821” . Agents retry. Agents get triggered twice by the same alert. Without a guard you get five copies of the same report, and retrieval then returns five near-identical hits that crowd out everything else. We added an optional dedup key for example id-