
A vector index is not agent memory
A real routing trace from a small bookstore agent over seven AWS stores. Each question went to one store, one store was skipped on purpose, and the same Valkey instance did two different jobs.
Each question picks its own store
A vector index cannot tell you what is happening right now.
When an agent gets "now" wrong, the first instinct is to add more documents to the index. I have watched that fail in four systems I have worked on. The index ranks what is similar. It has nothing to rank when you ask what is current or who is connected to whom.
So I route before I retrieve. Each kind of question has a shape, and the shape picks the store.
To show it without anyone's data, I built a small bookstore agent over seven AWS stores, following the public MIT-licensed Bookstore Demo App pattern. It runs locally and gives identical output on repeated runs. The traces show the routing. They say nothing about speed or cost, which I have not measured.
One question, five stores
"Last time you helped me find a book about a young wizard. Is it back in stock, and would I like anything my friends are reading?"
Here is the routing trace the agent printed, with the reasons shortened and the store column added by me:
1
2
3
4
5
6
7
SUB-Q TOOL STORE WHAT IT DID
S1 recallPriorSession AgentCore Memory exact lookup, no search needed
S3 suggestInStockSimilar DynamoDB vector search, in-stock items only
S5 friendsSimilar Neptune graph traversal + vector rank, one query
S4 similarWithRatings Aurora pgvector JOIN + AVG + vector rank, one query
S6 reviewsByMood S3 Vectors cheap archive of rarely searched reviews
Skipped: S2 (title resolved exactly via AgentCore Memory)OpenSearch sat out because AgentCore Memory had already pinned down the title.
In April I wrote that managed memory lets you skip the vector database. For one question in this agent that still holds, the one that recalls a summary of an earlier session. The other four, DynamoDB, Neptune, Aurora and S3 Vectors, need something else.
The same Valkey instance, twice
Two questions in the same conversation: "What are today's best sellers?" and, much later, "What exactly did you say earlier, word for word?"
1
2
getBestSellers Valkey sorted set, no vectors, no LLM routing
recallVerbatimTurn Valkey vector search over this session's own turnsElastiCache for Valkey answered both. The first was a sorted-set read. The second was a vector search over the session's turns, and it returned the literal sentence the agent had said earlier, where AgentCore Memory would have returned a summary.
Which store do you reach for first for agent memory on AWS, and what question made you pick it? Vote in the poll and tell me why in the comments.
The full map and traces are in this gist . Next time, what happens when the database rejects the agent's write.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article