cd /news/artificial-intelligence/42-60-days-system-design-questions · home topics artificial-intelligence article
[ARTICLE · art-31591] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

42/60 Days System Design Questions

A developer outlines four memory architecture options for AI agents that lose context after multiple turns. The choices include in-context window, vector memory store, episodic memory with summarization, and Redis session state, each with trade-offs for task-oriented agents.

read1 min views1 publishedJun 17, 2026

Your AI agent remembered the user's name.

Then it forgot what it was doing.

Here's the setup:

User asks the agent: book the cheapest flight to NYC, search hotels under $150/night, then compare total trip cost.

By step 3, the agent calls the LLM with 8,000 tokens of raw conversation history — and still answers as if it's turn 1.

You need a memory architecture before this ships. Which one do you pick?

A) In-context window only — full conversation stays in the system prompt. Simple. Breaks at ~15 turns or 8K tokens, whichever comes first.

B) Vector memory store — embed past turns, retrieve the top-k by semantic similarity at query time. Works great until "NYC flight" pulls a memory about a past NYC trip instead of the current task.

C) Episodic memory with summarization — compress old turns into structured event summaries, inject the relevant ones per request. More complex to build. Much harder to confuse.

D) Redis session state — structured key-value store, explicit agent reads/writes. Deterministic. Requires the agent to know what to store and when.

One of these collapses past 15 turns. One retrieves the wrong context at exactly the wrong moment. One is the right answer for task-oriented agents.

Pick A, B, C, or D — and tell me where you've hit this in production. Full breakdown in the comments.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @redis 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/42-60-days-system-de…] indexed:0 read:1min 2026-06-17 ·