Skip to content
Tech Interview Prep home
Technical interview guide

Agent Memory & Context Management

Giving agents state across turns and sessions despite a fixed, finite context window.

Read
45 min
Practice MCQs
25
Interview QA
25
Edition
v4
Editorial status
Reviewed

Scope: MemGPT, Generative Agents, Reflexion, RAG, Lost in the Middle, Sentence-BERT, HNSW, Model Cards, NIST Privacy Framework and GenAI Profile, and OWASP Prompt Injection/Sensitive Disclosure references reviewed 2026-09-04.

Interview QA

Treat each question like a live interview question: answer out loud first (structure, assumptions, tradeoffs), then open the model answer to spot gaps and rehearse a tighter follow-up.

Curated: · Written: · Reviewed:

QA-1

Explain the agent memory lifecycle.

QA-2

Model episodic, semantic, and procedural memory.

QA-3

Design working memory for a long-running agent task.

QA-4

Design a memory-write policy.

QA-5

Define a production memory record schema.

QA-6

Choose between relational, document, keyword, and vector memory storage.

QA-7

Implement tenant-safe memory retrieval.

QA-8

Design memory retrieval ranking.

QA-9

Resolve temporal and conflicting memories.

QA-10

Design expiration and decay policies.

QA-11

Build safe conversational memory compaction.

QA-12

Design a context-window scheduler.

QA-13

Defend long-term memory from prompt injection.

QA-14

Separate personalization memory from action authorization.

QA-15

Design user controls for personalization memory.

QA-16

Implement and verify memory deletion.

QA-17

Secure memory storage and operations.

QA-18

How do you trace and measure context degradation, token churn, and memory retrieval latency across multi-turn agent execution?

QA-19

Build an end-to-end memory evaluation suite.

QA-20

Prevent self-reinforcing memory errors.

QA-21

Design concurrency control for memory writes and corrections.

QA-22

Implement correction propagation through a memory provenance graph.

QA-23

Migrate an agent memory system without losing correctness.

QA-24

Roll out a memory change safely.

QA-25

Review agent memory and context management end to end.